Skip to content

NameError: name 'MonitorType' is not defined #78

@ckortenhorst

Description

@ckortenhorst

I am trying to import 200 monitors to Kuma however when I run following I get error.

>>> with UptimeKumaApi('http://localhost:3001/') as api:
...     api.login('admin', '*******')
...     api.add_monitor(
...         type=MonitorType.HTTP,
...         name="Google",
...         url="https://google.com"
...     )
...
{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiaCI6ImZiMzQ2NTRkMWYwNzVkNjBhZTgzZjM3YTdkOGJmYWViIiwiaWF0IjoxNzM4MTYzNzUwfQ.SyFaqW04-ebWznne3dncGxW2ThWfnizg8fFQstoO8_0'}
Traceback (most recent call last):
  File "<stdin>", line 4, in <module>
NameError: name 'MonitorType' is not defined

NameError: name 'MonitorType' is not defined

Am I missing some step in using the library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions