Implement rest of the moderation API
This commit is contained in:
pare
c671f4bbb3
commit
9b8d6f37a2
S'han modificat 1 arxius amb 34 adicions i 10 eliminacions
|
@ -2514,21 +2514,45 @@ class Mastodon:
|
|||
id = self.__unpack_id(id)
|
||||
return self.__api_request('GET', '/api/v1/admin/reports/{0}'.format(id))
|
||||
|
||||
@api_version("2.9.1", "2.9.1", __DICT_VERSION_REPORT)
|
||||
def admin_report_assign(self, id):
|
||||
pass
|
||||
#POST /api/v1/admin/reports/:id/assign_to_self Assign report to self
|
||||
"""
|
||||
Assigns the given report to the logged-in user.
|
||||
|
||||
Returns the updated `report dict`_.
|
||||
"""
|
||||
id = self.__unpack_id(id)
|
||||
return self.__api_request('POST', '/api/v1/admin/reports/{0}/assign_to_sel'.format(id))
|
||||
|
||||
@api_version("2.9.1", "2.9.1", __DICT_VERSION_REPORT)
|
||||
def admin_report_unassign(self, id):
|
||||
pass
|
||||
#POST /api/v1/admin/reports/:id/unassign Unassign report from self
|
||||
"""
|
||||
Unassigns the given report from the logged-in user.
|
||||
|
||||
Returns the updated `report dict`_.
|
||||
"""
|
||||
id = self.__unpack_id(id)
|
||||
return self.__api_request('POST', '/api/v1/admin/reports/{0}/unassign'.format(id))
|
||||
|
||||
@api_version("2.9.1", "2.9.1", __DICT_VERSION_REPORT)
|
||||
def admin_report_reopen(self, id):
|
||||
pass
|
||||
#POST /api/v1/admin/reports/:id/reopen Re-open report
|
||||
"""
|
||||
Reopens a closed report.
|
||||
|
||||
Returns the updated `report dict`_.
|
||||
"""
|
||||
id = self.__unpack_id(id)
|
||||
return self.__api_request('POST', '/api/v1/admin/reports/{0}/reopen'.format(id))
|
||||
|
||||
@api_version("2.9.1", "2.9.1", __DICT_VERSION_REPORT)
|
||||
def admin_report_resolve(self, id):
|
||||
pass
|
||||
#POST /api/v1/admin/reports/:id/resolve Close report
|
||||
"""
|
||||
Marks a report as resolved (without taking any action).
|
||||
|
||||
Returns the updated `report dict`_.
|
||||
"""
|
||||
id = self.__unpack_id(id)
|
||||
return self.__api_request('POST', '/api/v1/admin/reports/{0}/resolve'.format(id))
|
||||
|
||||
###
|
||||
# Push subscription crypto utilities
|
||||
|
|
Loading…
Referencia en una nova incidència