Added more endpoints
This commit is contained in:
pare
856abe1a24
commit
52fdfee0c1
S'han modificat 1 arxius amb 98 adicions i 1 eliminacions
|
@ -68,6 +68,62 @@ class MisskeyAPI:
|
|||
|
||||
self.__request_timeout = request_timeout
|
||||
|
||||
###
|
||||
# admin
|
||||
###
|
||||
|
||||
def admin_silence_user(self, i=None, userId=None):
|
||||
|
||||
params = {
|
||||
'i': i,
|
||||
'userId': userId
|
||||
}
|
||||
|
||||
endpoint = self.api_base_url + '/api/admin/silence-user'
|
||||
|
||||
response = self.__api_request(endpoint, params)
|
||||
|
||||
return response
|
||||
|
||||
def admin_suspend_user(self, i=None, userId=None):
|
||||
|
||||
params = {
|
||||
'i': i,
|
||||
'userId': userId
|
||||
}
|
||||
|
||||
endpoint = self.api_base_url + '/api/admin/suspend-user'
|
||||
|
||||
response = self.__api_request(endpoint, params)
|
||||
|
||||
return response
|
||||
|
||||
def admin_unsilence_user(self, i=None, userId=None):
|
||||
|
||||
params = {
|
||||
'i': i,
|
||||
'userId': userId
|
||||
}
|
||||
|
||||
endpoint = self.api_base_url + '/api/admin/unsilence-user'
|
||||
|
||||
response = self.__api_request(endpoint, params)
|
||||
|
||||
return response
|
||||
|
||||
def admin_unsuspend_user(self, i=None, userId=None):
|
||||
|
||||
params = {
|
||||
'i': i,
|
||||
'userId': userId
|
||||
}
|
||||
|
||||
endpoint = self.api_base_url + '/api/admin/unsuspend-user'
|
||||
|
||||
response = self.__api_request(endpoint, params)
|
||||
|
||||
return response
|
||||
|
||||
def i(self, i=None):
|
||||
|
||||
params = {
|
||||
|
@ -247,12 +303,53 @@ class MisskeyAPI:
|
|||
|
||||
return response
|
||||
|
||||
def blocking_create(self, i=None, userId=None):
|
||||
|
||||
params = {
|
||||
'i': i,
|
||||
'userId': userId,
|
||||
}
|
||||
|
||||
endpoint = self.api_base_url + '/api/blocking/create'
|
||||
|
||||
response = self.__api_request(endpoint, params)
|
||||
|
||||
return response
|
||||
|
||||
def blocking_delete(self, i=None, userId=None):
|
||||
|
||||
params = {
|
||||
'i': i,
|
||||
'userId': userId,
|
||||
}
|
||||
|
||||
endpoint = self.api_base_url + '/api/blocking/delete'
|
||||
|
||||
response = self.__api_request(endpoint, params)
|
||||
|
||||
return response
|
||||
|
||||
def blocking_list(self, i=None, limit=None, sinceId=None, untilId=None):
|
||||
|
||||
params = {
|
||||
'i': i,
|
||||
'limit': limit,
|
||||
'sinceId': sinceId,
|
||||
'untilId': untilId
|
||||
}
|
||||
|
||||
endpoint = self.api_base_url + '/api/blocking/list'
|
||||
|
||||
response = self.__api_request(endpoint, params)
|
||||
|
||||
return response
|
||||
|
||||
def federation_instances(self):
|
||||
|
||||
params = {
|
||||
}
|
||||
|
||||
endpoint = self.api_base_url + '/api/federation/instances'
|
||||
endpoint = self.api_base_url + '/api/blocking/instances'
|
||||
|
||||
response = self.__api_request(endpoint, params)
|
||||
|
||||
|
|
Loading…
Referencia en una nova incidència