implement status page and database
This commit is contained in:
parent
bfe002c11d
commit
c324de2d44
1 changed files with 27 additions and 1 deletions
|
@ -365,9 +365,27 @@ class UptimeKumaApi(object):
|
|||
|
||||
# status page
|
||||
|
||||
def get_statuspages(self):
|
||||
def get_status_pages(self):
|
||||
return self.get_event_data("statusPageList")
|
||||
|
||||
def post_incident(self, slug, incident):
|
||||
return self.sio.call('postIncident', (slug, incident))
|
||||
|
||||
def unpin_incident(self, slug):
|
||||
return self.sio.call('unpinIncident', slug)
|
||||
|
||||
def get_status_page(self, slug):
|
||||
return self.sio.call('getStatusPage', slug)
|
||||
|
||||
def save_status_page(self, slug, config, img_data_url, public_group_list):
|
||||
return self.sio.call('saveStatusPage', (slug, config, img_data_url, public_group_list))
|
||||
|
||||
def add_status_page(self, title, slug):
|
||||
return self.sio.call('addStatusPage', (title, slug))
|
||||
|
||||
def delete_status_page(self, slug):
|
||||
return self.sio.call('deleteStatusPage', slug)
|
||||
|
||||
# heartbeat
|
||||
|
||||
def get_heartbeats(self):
|
||||
|
@ -481,3 +499,11 @@ class UptimeKumaApi(object):
|
|||
|
||||
def setup(self, username, password):
|
||||
return self.sio.call("setup", (username, password))
|
||||
|
||||
# database
|
||||
|
||||
def get_database_size(self):
|
||||
return self.sio.call('getDatabaseSize')
|
||||
|
||||
def shrink_database(self):
|
||||
return self.sio.call('shrinkDatabase')
|
||||
|
|
Loading…
Reference in a new issue