diff options
Diffstat (limited to 'mastodon')
-rw-r--r-- | mastodon/Mastodon.py | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index 5b521d1..b1c55b1 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py | |||
@@ -202,7 +202,7 @@ class Mastodon: | |||
202 | __DICT_VERSION_SEARCHRESULT = bigger_version(bigger_version(bigger_version("1.0.0", | 202 | __DICT_VERSION_SEARCHRESULT = bigger_version(bigger_version(bigger_version("1.0.0", |
203 | __DICT_VERSION_ACCOUNT), __DICT_VERSION_STATUS), __DICT_VERSION_HASHTAG) | 203 | __DICT_VERSION_ACCOUNT), __DICT_VERSION_STATUS), __DICT_VERSION_HASHTAG) |
204 | __DICT_VERSION_ACTIVITY = "2.1.2" | 204 | __DICT_VERSION_ACTIVITY = "2.1.2" |
205 | __DICT_VERSION_REPORT = "1.1.0" | 205 | __DICT_VERSION_REPORT = "2.9.1" |
206 | __DICT_VERSION_PUSH = "2.4.0" | 206 | __DICT_VERSION_PUSH = "2.4.0" |
207 | __DICT_VERSION_PUSH_NOTIF = "2.4.0" | 207 | __DICT_VERSION_PUSH_NOTIF = "2.4.0" |
208 | __DICT_VERSION_FILTER = "2.4.3" | 208 | __DICT_VERSION_FILTER = "2.4.3" |
@@ -210,7 +210,6 @@ class Mastodon: | |||
210 | __DICT_VERSION_SCHEDULED_STATUS = bigger_version("2.7.0", __DICT_VERSION_STATUS) | 210 | __DICT_VERSION_SCHEDULED_STATUS = bigger_version("2.7.0", __DICT_VERSION_STATUS) |
211 | __DICT_VERSION_PREFERENCES = "2.8.0" | 211 | __DICT_VERSION_PREFERENCES = "2.8.0" |
212 | __DICT_VERSION_ADMIN_ACCOUNT = "2.9.1" | 212 | __DICT_VERSION_ADMIN_ACCOUNT = "2.9.1" |
213 | __DICT_VERSION_ADMIN_REPORT = "2.9.1" | ||
214 | 213 | ||
215 | ### | 214 | ### |
216 | # Registering apps | 215 | # Registering apps |
@@ -2474,10 +2473,10 @@ class Mastodon: | |||
2474 | 2473 | ||
2475 | self.__api_request('POST', '/api/v1/admin/accounts/{0}/action'.format(id), params) | 2474 | self.__api_request('POST', '/api/v1/admin/accounts/{0}/action'.format(id), params) |
2476 | 2475 | ||
2477 | @api_version("2.9.1", "2.9.1", __DICT_VERSION_ADMIN_REPORT) | 2476 | @api_version("2.9.1", "2.9.1", __DICT_VERSION_REPORT) |
2478 | def admin_reports(self, resolved=False, account_id=None, target_account_id=None, max_id=None, min_id=None, since_id=None, limit=None): | 2477 | def admin_reports(self, resolved=False, account_id=None, target_account_id=None, max_id=None, min_id=None, since_id=None, limit=None): |
2479 | """ | 2478 | """ |
2480 | Get a list of reports. | 2479 | Fetches the list of reports. |
2481 | 2480 | ||
2482 | Set `resolved` to True to search for resolved reports. `account_id` and `target_account_id` | 2481 | Set `resolved` to True to search for resolved reports. `account_id` and `target_account_id` |
2483 | can be used to get reports filed by or about a specific user. | 2482 | can be used to get reports filed by or about a specific user. |
@@ -2506,8 +2505,13 @@ class Mastodon: | |||
2506 | return self.__api_request('GET', '/api/v1/admin/reports', params) | 2505 | return self.__api_request('GET', '/api/v1/admin/reports', params) |
2507 | 2506 | ||
2508 | def admin_report(self, id): | 2507 | def admin_report(self, id): |
2509 | pass | 2508 | """ |
2510 | #GET /api/v1/admin/reports/:id Get a specific report | 2509 | Fetches the report with the given id. |
2510 | |||
2511 | Returns a `report dict`_. | ||
2512 | """ | ||
2513 | id = self.__unpack_id(id) | ||
2514 | return self.__api_request('GET', '/api/v1/admin/reports/{0}'.format(id)) | ||
2511 | 2515 | ||
2512 | def admin_report_assign(self, id): | 2516 | def admin_report_assign(self, id): |
2513 | pass | 2517 | pass |
@@ -2801,7 +2805,7 @@ class Mastodon: | |||
2801 | """ | 2805 | """ |
2802 | Parse dates in certain known json fields, if possible. | 2806 | Parse dates in certain known json fields, if possible. |
2803 | """ | 2807 | """ |
2804 | known_date_fields = ["created_at", "week", "day", "expires_at", "scheduled_at"] | 2808 | known_date_fields = ["created_at", "week", "day", "expires_at", "scheduled_at", "updated_at"] |
2805 | for k, v in json_object.items(): | 2809 | for k, v in json_object.items(): |
2806 | if k in known_date_fields: | 2810 | if k in known_date_fields: |
2807 | if v != None: | 2811 | if v != None: |