aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.rst2
-rw-r--r--docs/index.rst10
-rw-r--r--mastodon/Mastodon.py92
3 files changed, 56 insertions, 48 deletions
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index f49f9a9..2934f0d 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -12,7 +12,7 @@ v1.8.0 (in progress)
12* This too isn't really a changelog entry but in the same vein as the last post, thank you Claire and Gargron for clarifying many things about the API when asked. 12* This too isn't really a changelog entry but in the same vein as the last post, thank you Claire and Gargron for clarifying many things about the API when asked.
13* Make the documentation a bit neater (thanks dieseltravis) 13* Make the documentation a bit neater (thanks dieseltravis)
14* Add the domain blocking admin API (`admin_domain_blocks`, `admin_domain_block`, `admin_update_domain_block`, `admin_delete_domain_block` - thanks catgoat) 14* Add the domain blocking admin API (`admin_domain_blocks`, `admin_domain_block`, `admin_update_domain_block`, `admin_delete_domain_block` - thanks catgoat)
15 15* Add the stats admin APIs (`admin_measures`, `admin_dimensions`, `admin_retention`)
16v1.7.0 16v1.7.0
17------ 17------
18* Cleaned code up a bit (thanks eumiro) 18* Cleaned code up a bit (thanks eumiro)
diff --git a/docs/index.rst b/docs/index.rst
index 4db2d7e..cb4610e 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -254,6 +254,9 @@ and everything will work as intended. The class used for this is exposed as
254User / account dicts 254User / account dicts
255~~~~~~~~~~~~~~~~~~~~ 255~~~~~~~~~~~~~~~~~~~~
256.. _user dict: 256.. _user dict:
257.. _user dicts:
258.. _account dict:
259.. _account dicts:
257 260
258.. code-block:: python 261.. code-block:: python
259 262
@@ -299,9 +302,12 @@ User / account dicts
299 'note': # Plain text version of the user's bio 302 'note': # Plain text version of the user's bio
300 } 303 }
301 304
302Toot dicts 305Toot / Status dicts
303~~~~~~~~~~ 306~~~~~~~~~~
304.. _toot dict: 307.. _toot dict:
308.. _toot dicts:
309.. _status dict:
310.. _status dicts:
305 311
306.. code-block:: python 312.. code-block:: python
307 313
@@ -1232,6 +1238,7 @@ interact with already posted statuses.
1232.. automethod:: Mastodon.status_bookmark 1238.. automethod:: Mastodon.status_bookmark
1233.. automethod:: Mastodon.status_unbookmark 1239.. automethod:: Mastodon.status_unbookmark
1234.. automethod:: Mastodon.status_delete 1240.. automethod:: Mastodon.status_delete
1241.. _status_update():
1235.. automethod:: Mastodon.status_update 1242.. automethod:: Mastodon.status_update
1236 1243
1237 1244
@@ -1268,6 +1275,7 @@ Writing data: Accounts
1268These functions allow you to interact with other accounts: To (un)follow and 1275These functions allow you to interact with other accounts: To (un)follow and
1269(un)block. 1276(un)block.
1270 1277
1278.. _account_follow():
1271.. automethod:: Mastodon.account_follow 1279.. automethod:: Mastodon.account_follow
1272.. automethod:: Mastodon.account_unfollow 1280.. automethod:: Mastodon.account_unfollow
1273.. automethod:: Mastodon.account_block 1281.. automethod:: Mastodon.account_block
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py
index 2ae1394..61e7302 100644
--- a/mastodon/Mastodon.py
+++ b/mastodon/Mastodon.py
@@ -900,7 +900,7 @@ class Mastodon:
900 900
901 May or may not require authentication depending on server settings and what is specifically requested. 901 May or may not require authentication depending on server settings and what is specifically requested.
902 902
903 Returns a list of `toot dicts`_. 903 Returns a list of `status dicts`_.
904 """ 904 """
905 if max_id is not None: 905 if max_id is not None:
906 max_id = self.__unpack_id(max_id, dateconv=True) 906 max_id = self.__unpack_id(max_id, dateconv=True)
@@ -935,7 +935,7 @@ class Mastodon:
935 """ 935 """
936 Convenience method: Fetches the logged-in user's home timeline (i.e. followed users and self). Params as in `timeline()`. 936 Convenience method: Fetches the logged-in user's home timeline (i.e. followed users and self). Params as in `timeline()`.
937 937
938 Returns a list of `toot dicts`_. 938 Returns a list of `status dicts`_.
939 """ 939 """
940 return self.timeline('home', max_id=max_id, min_id=min_id, since_id=since_id, limit=limit, only_media=only_media, local=local, remote=remote) 940 return self.timeline('home', max_id=max_id, min_id=min_id, since_id=since_id, limit=limit, only_media=only_media, local=local, remote=remote)
941 941
@@ -944,7 +944,7 @@ class Mastodon:
944 """ 944 """
945 Convenience method: Fetches the local / instance-wide timeline, not including replies. Params as in `timeline()`. 945 Convenience method: Fetches the local / instance-wide timeline, not including replies. Params as in `timeline()`.
946 946
947 Returns a list of `toot dicts`_. 947 Returns a list of `status dicts`_.
948 """ 948 """
949 return self.timeline('local', max_id=max_id, min_id=min_id, since_id=since_id, limit=limit, only_media=only_media) 949 return self.timeline('local', max_id=max_id, min_id=min_id, since_id=since_id, limit=limit, only_media=only_media)
950 950
@@ -953,7 +953,7 @@ class Mastodon:
953 """ 953 """
954 Convenience method: Fetches the public / visible-network / federated timeline, not including replies. Params as in `timeline()`. 954 Convenience method: Fetches the public / visible-network / federated timeline, not including replies. Params as in `timeline()`.
955 955
956 Returns a list of `toot dicts`_. 956 Returns a list of `status dicts`_.
957 """ 957 """
958 return self.timeline('public', max_id=max_id, min_id=min_id, since_id=since_id, limit=limit, only_media=only_media, local=local, remote=remote) 958 return self.timeline('public', max_id=max_id, min_id=min_id, since_id=since_id, limit=limit, only_media=only_media, local=local, remote=remote)
959 959
@@ -963,7 +963,7 @@ class Mastodon:
963 Convenience method: Fetch a timeline of toots with a given hashtag. The hashtag parameter 963 Convenience method: Fetch a timeline of toots with a given hashtag. The hashtag parameter
964 should not contain the leading #. Params as in `timeline()`. 964 should not contain the leading #. Params as in `timeline()`.
965 965
966 Returns a list of `toot dicts`_. 966 Returns a list of `status dicts`_.
967 """ 967 """
968 if hashtag.startswith("#"): 968 if hashtag.startswith("#"):
969 raise MastodonIllegalArgumentError( 969 raise MastodonIllegalArgumentError(
@@ -975,7 +975,7 @@ class Mastodon:
975 """ 975 """
976 Convenience method: Fetches a timeline containing all the toots by users in a given list. Params as in `timeline()`. 976 Convenience method: Fetches a timeline containing all the toots by users in a given list. Params as in `timeline()`.
977 977
978 Returns a list of `toot dicts`_. 978 Returns a list of `status dicts`_.
979 """ 979 """
980 id = self.__unpack_id(id) 980 id = self.__unpack_id(id)
981 return self.timeline('list/{0}'.format(id), max_id=max_id, min_id=min_id, since_id=since_id, limit=limit, only_media=only_media, local=local, remote=remote) 981 return self.timeline('list/{0}'.format(id), max_id=max_id, min_id=min_id, since_id=since_id, limit=limit, only_media=only_media, local=local, remote=remote)
@@ -1009,7 +1009,7 @@ class Mastodon:
1009 1009
1010 Does not require authentication for publicly visible statuses. 1010 Does not require authentication for publicly visible statuses.
1011 1011
1012 Returns a `toot dict`_. 1012 Returns a `status dict`_.
1013 """ 1013 """
1014 id = self.__unpack_id(id) 1014 id = self.__unpack_id(id)
1015 url = '/api/v1/statuses/{0}'.format(str(id)) 1015 url = '/api/v1/statuses/{0}'.format(str(id))
@@ -1024,7 +1024,7 @@ class Mastodon:
1024 Does not require authentication for publicly visible statuses. 1024 Does not require authentication for publicly visible statuses.
1025 1025
1026 This function is deprecated as of 3.0.0 and the endpoint does not 1026 This function is deprecated as of 3.0.0 and the endpoint does not
1027 exist anymore - you should just use the "card" field of the toot dicts 1027 exist anymore - you should just use the "card" field of the status dicts
1028 instead. Mastodon.py will try to mimic the old behaviour, but this 1028 instead. Mastodon.py will try to mimic the old behaviour, but this
1029 is somewhat inefficient and not guaranteed to be the case forever. 1029 is somewhat inefficient and not guaranteed to be the case forever.
1030 1030
@@ -1057,7 +1057,7 @@ class Mastodon:
1057 1057
1058 Does not require authentication for publicly visible statuses. 1058 Does not require authentication for publicly visible statuses.
1059 1059
1060 Returns a list of `user dicts`_. 1060 Returns a list of `account dicts`_.
1061 """ 1061 """
1062 id = self.__unpack_id(id) 1062 id = self.__unpack_id(id)
1063 url = '/api/v1/statuses/{0}/reblogged_by'.format(str(id)) 1063 url = '/api/v1/statuses/{0}/reblogged_by'.format(str(id))
@@ -1070,7 +1070,7 @@ class Mastodon:
1070 1070
1071 Does not require authentication for publicly visible statuses. 1071 Does not require authentication for publicly visible statuses.
1072 1072
1073 Returns a list of `user dicts`_. 1073 Returns a list of `account dicts`_.
1074 """ 1074 """
1075 id = self.__unpack_id(id) 1075 id = self.__unpack_id(id)
1076 url = '/api/v1/statuses/{0}/favourited_by'.format(str(id)) 1076 url = '/api/v1/statuses/{0}/favourited_by'.format(str(id))
@@ -1084,7 +1084,7 @@ class Mastodon:
1084 """ 1084 """
1085 Fetch a list of scheduled statuses 1085 Fetch a list of scheduled statuses
1086 1086
1087 Returns a list of `scheduled toot dicts`_. 1087 Returns a list of `scheduled status dicts`_.
1088 """ 1088 """
1089 return self.__api_request('GET', '/api/v1/scheduled_statuses') 1089 return self.__api_request('GET', '/api/v1/scheduled_statuses')
1090 1090
@@ -1093,7 +1093,7 @@ class Mastodon:
1093 """ 1093 """
1094 Fetch information about the scheduled status with the given id. 1094 Fetch information about the scheduled status with the given id.
1095 1095
1096 Returns a `scheduled toot dict`_. 1096 Returns a `scheduled status dict`_.
1097 """ 1097 """
1098 id = self.__unpack_id(id) 1098 id = self.__unpack_id(id)
1099 url = '/api/v1/scheduled_statuses/{0}'.format(str(id)) 1099 url = '/api/v1/scheduled_statuses/{0}'.format(str(id))
@@ -1183,7 +1183,7 @@ class Mastodon:
1183 1183
1184 Does not require authentication for publicly visible accounts. 1184 Does not require authentication for publicly visible accounts.
1185 1185
1186 Returns a `user dict`_. 1186 Returns a `account dict`_.
1187 """ 1187 """
1188 id = self.__unpack_id(id) 1188 id = self.__unpack_id(id)
1189 url = '/api/v1/accounts/{0}'.format(str(id)) 1189 url = '/api/v1/accounts/{0}'.format(str(id))
@@ -1194,7 +1194,7 @@ class Mastodon:
1194 """ 1194 """
1195 Fetch logged-in user's account information. 1195 Fetch logged-in user's account information.
1196 1196
1197 Returns a `user dict`_ (Starting from 2.1.0, with an additional "source" field). 1197 Returns a `account dict`_ (Starting from 2.1.0, with an additional "source" field).
1198 """ 1198 """
1199 return self.__api_request('GET', '/api/v1/accounts/verify_credentials') 1199 return self.__api_request('GET', '/api/v1/accounts/verify_credentials')
1200 1200
@@ -1225,7 +1225,7 @@ class Mastodon:
1225 Does not require authentication for Mastodon versions after 2.7.0 (returns 1225 Does not require authentication for Mastodon versions after 2.7.0 (returns
1226 publicly visible statuses in that case), for publicly visible accounts. 1226 publicly visible statuses in that case), for publicly visible accounts.
1227 1227
1228 Returns a list of `toot dicts`_. 1228 Returns a list of `status dicts`_.
1229 """ 1229 """
1230 id = self.__unpack_id(id) 1230 id = self.__unpack_id(id)
1231 if max_id is not None: 1231 if max_id is not None:
@@ -1255,7 +1255,7 @@ class Mastodon:
1255 """ 1255 """
1256 Fetch users the given user is following. 1256 Fetch users the given user is following.
1257 1257
1258 Returns a list of `user dicts`_. 1258 Returns a list of `account dicts`_.
1259 """ 1259 """
1260 id = self.__unpack_id(id) 1260 id = self.__unpack_id(id)
1261 if max_id is not None: 1261 if max_id is not None:
@@ -1276,7 +1276,7 @@ class Mastodon:
1276 """ 1276 """
1277 Fetch users the given user is followed by. 1277 Fetch users the given user is followed by.
1278 1278
1279 Returns a list of `user dicts`_. 1279 Returns a list of `account dicts`_.
1280 """ 1280 """
1281 id = self.__unpack_id(id) 1281 id = self.__unpack_id(id)
1282 if max_id is not None: 1282 if max_id is not None:
@@ -1312,7 +1312,7 @@ class Mastodon:
1312 in the username@domain format and not yet in the database. Set `following` to 1312 in the username@domain format and not yet in the database. Set `following` to
1313 True to limit the search to users the logged-in user follows. 1313 True to limit the search to users the logged-in user follows.
1314 1314
1315 Returns a list of `user dicts`_. 1315 Returns a list of `account dicts`_.
1316 """ 1316 """
1317 params = self.__generate_params(locals()) 1317 params = self.__generate_params(locals())
1318 1318
@@ -1435,7 +1435,7 @@ class Mastodon:
1435 """ 1435 """
1436 Fetch follow suggestions for the logged-in user. 1436 Fetch follow suggestions for the logged-in user.
1437 1437
1438 Returns a list of `user dicts`_. 1438 Returns a list of `account dicts`_.
1439 1439
1440 """ 1440 """
1441 return self.__api_request('GET', '/api/v1/suggestions') 1441 return self.__api_request('GET', '/api/v1/suggestions')
@@ -1457,7 +1457,7 @@ class Mastodon:
1457 1457
1458 `local` True to return only local accounts. 1458 `local` True to return only local accounts.
1459 1459
1460 Returns a list of `user dicts`_. 1460 Returns a list of `account dicts`_.
1461 1461
1462 """ 1462 """
1463 params = self.__generate_params(locals()) 1463 params = self.__generate_params(locals())
@@ -1471,7 +1471,7 @@ class Mastodon:
1471 """ 1471 """
1472 Fetch list of users endorsed by the logged-in user. 1472 Fetch list of users endorsed by the logged-in user.
1473 1473
1474 Returns a list of `user dicts`_. 1474 Returns a list of `account dicts`_.
1475 1475
1476 """ 1476 """
1477 return self.__api_request('GET', '/api/v1/endorsements') 1477 return self.__api_request('GET', '/api/v1/endorsements')
@@ -1607,7 +1607,7 @@ class Mastodon:
1607 1607
1608 Pass `lang` to override the global locale parameter, which may affect trend ordering. 1608 Pass `lang` to override the global locale parameter, which may affect trend ordering.
1609 1609
1610 Returns a list of `toot dicts`_, sorted by the instances's trending algorithm, 1610 Returns a list of `status dicts`_, sorted by the instances's trending algorithm,
1611 descending. 1611 descending.
1612 """ 1612 """
1613 params = self.__generate_params(locals()) 1613 params = self.__generate_params(locals())
@@ -1654,7 +1654,7 @@ class Mastodon:
1654 """ 1654 """
1655 Get the accounts that are on the given list. 1655 Get the accounts that are on the given list.
1656 1656
1657 Returns a list of `user dicts`_. 1657 Returns a list of `account dicts`_.
1658 """ 1658 """
1659 id = self.__unpack_id(id) 1659 id = self.__unpack_id(id)
1660 1660
@@ -1678,7 +1678,7 @@ class Mastodon:
1678 """ 1678 """
1679 Fetch a list of users muted by the logged-in user. 1679 Fetch a list of users muted by the logged-in user.
1680 1680
1681 Returns a list of `user dicts`_. 1681 Returns a list of `account dicts`_.
1682 """ 1682 """
1683 if max_id is not None: 1683 if max_id is not None:
1684 max_id = self.__unpack_id(max_id, dateconv=True) 1684 max_id = self.__unpack_id(max_id, dateconv=True)
@@ -1697,7 +1697,7 @@ class Mastodon:
1697 """ 1697 """
1698 Fetch a list of users blocked by the logged-in user. 1698 Fetch a list of users blocked by the logged-in user.
1699 1699
1700 Returns a list of `user dicts`_. 1700 Returns a list of `account dicts`_.
1701 """ 1701 """
1702 if max_id is not None: 1702 if max_id is not None:
1703 max_id = self.__unpack_id(max_id, dateconv=True) 1703 max_id = self.__unpack_id(max_id, dateconv=True)
@@ -1736,7 +1736,7 @@ class Mastodon:
1736 """ 1736 """
1737 Fetch the logged-in user's favourited statuses. 1737 Fetch the logged-in user's favourited statuses.
1738 1738
1739 Returns a list of `toot dicts`_. 1739 Returns a list of `status dicts`_.
1740 """ 1740 """
1741 if max_id is not None: 1741 if max_id is not None:
1742 max_id = self.__unpack_id(max_id, dateconv=True) 1742 max_id = self.__unpack_id(max_id, dateconv=True)
@@ -1758,7 +1758,7 @@ class Mastodon:
1758 """ 1758 """
1759 Fetch the logged-in user's incoming follow requests. 1759 Fetch the logged-in user's incoming follow requests.
1760 1760
1761 Returns a list of `user dicts`_. 1761 Returns a list of `account dicts`_.
1762 """ 1762 """
1763 if max_id is not None: 1763 if max_id is not None:
1764 max_id = self.__unpack_id(max_id, dateconv=True) 1764 max_id = self.__unpack_id(max_id, dateconv=True)
@@ -1886,7 +1886,7 @@ class Mastodon:
1886 """ 1886 """
1887 Get a list of statuses bookmarked by the logged-in user. 1887 Get a list of statuses bookmarked by the logged-in user.
1888 1888
1889 Returns a list of `toot dicts`_. 1889 Returns a list of `status dicts`_.
1890 """ 1890 """
1891 if max_id is not None: 1891 if max_id is not None:
1892 max_id = self.__unpack_id(max_id, dateconv=True) 1892 max_id = self.__unpack_id(max_id, dateconv=True)
@@ -2023,7 +2023,7 @@ class Mastodon:
2023 2023
2024 Pass a datetime as `scheduled_at` to schedule the toot for a specific time 2024 Pass a datetime as `scheduled_at` to schedule the toot for a specific time
2025 (the time must be at least 5 minutes into the future). If this is passed, 2025 (the time must be at least 5 minutes into the future). If this is passed,
2026 status_post returns a `scheduled toot dict`_ instead. 2026 status_post returns a `scheduled status dict`_ instead.
2027 2027
2028 Pass `poll` to attach a poll to the status. An appropriate object can be 2028 Pass `poll` to attach a poll to the status. An appropriate object can be
2029 constructed using `make_poll()`_ . Note that as of Mastodon version 2029 constructed using `make_poll()`_ . Note that as of Mastodon version
@@ -2038,7 +2038,7 @@ class Mastodon:
2038 **Specific to "fedibird" feature set:**: The `quote_id` parameter is 2038 **Specific to "fedibird" feature set:**: The `quote_id` parameter is
2039 a non-standard extension that specifies the id of a quoted status. 2039 a non-standard extension that specifies the id of a quoted status.
2040 2040
2041 Returns a `toot dict`_ with the new status. 2041 Returns a `status dict`_ with the new status.
2042 """ 2042 """
2043 return self.__status_internal( 2043 return self.__status_internal(
2044 status, 2044 status,
@@ -2063,7 +2063,7 @@ class Mastodon:
2063 2063
2064 Usage in production code is not recommended. 2064 Usage in production code is not recommended.
2065 2065
2066 Returns a `toot dict`_ with the new status. 2066 Returns a `status dict`_ with the new status.
2067 """ 2067 """
2068 return self.status_post(status) 2068 return self.status_post(status)
2069 2069
@@ -2187,7 +2187,7 @@ class Mastodon:
2187 The visibility parameter functions the same as in `status_post()`_ and 2187 The visibility parameter functions the same as in `status_post()`_ and
2188 allows you to reduce the visibility of a reblogged status. 2188 allows you to reduce the visibility of a reblogged status.
2189 2189
2190 Returns a `toot dict`_ with a new status that wraps around the reblogged one. 2190 Returns a `status dict`_ with a new status that wraps around the reblogged one.
2191 """ 2191 """
2192 params = self.__generate_params(locals(), ['id']) 2192 params = self.__generate_params(locals(), ['id'])
2193 valid_visibilities = ['private', 'public', 'unlisted', 'direct'] 2193 valid_visibilities = ['private', 'public', 'unlisted', 'direct']
@@ -2206,7 +2206,7 @@ class Mastodon:
2206 """ 2206 """
2207 Un-reblog a status. 2207 Un-reblog a status.
2208 2208
2209 Returns a `toot dict`_ with the status that used to be reblogged. 2209 Returns a `status dict`_ with the status that used to be reblogged.
2210 """ 2210 """
2211 id = self.__unpack_id(id) 2211 id = self.__unpack_id(id)
2212 url = '/api/v1/statuses/{0}/unreblog'.format(str(id)) 2212 url = '/api/v1/statuses/{0}/unreblog'.format(str(id))
@@ -2217,7 +2217,7 @@ class Mastodon:
2217 """ 2217 """
2218 Favourite a status. 2218 Favourite a status.
2219 2219
2220 Returns a `toot dict`_ with the favourited status. 2220 Returns a `status dict`_ with the favourited status.
2221 """ 2221 """
2222 id = self.__unpack_id(id) 2222 id = self.__unpack_id(id)
2223 url = '/api/v1/statuses/{0}/favourite'.format(str(id)) 2223 url = '/api/v1/statuses/{0}/favourite'.format(str(id))
@@ -2228,7 +2228,7 @@ class Mastodon:
2228 """ 2228 """
2229 Un-favourite a status. 2229 Un-favourite a status.
2230 2230
2231 Returns a `toot dict`_ with the un-favourited status. 2231 Returns a `status dict`_ with the un-favourited status.
2232 """ 2232 """
2233 id = self.__unpack_id(id) 2233 id = self.__unpack_id(id)
2234 url = '/api/v1/statuses/{0}/unfavourite'.format(str(id)) 2234 url = '/api/v1/statuses/{0}/unfavourite'.format(str(id))
@@ -2239,7 +2239,7 @@ class Mastodon:
2239 """ 2239 """
2240 Mute notifications for a status. 2240 Mute notifications for a status.
2241 2241
2242 Returns a `toot dict`_ with the now muted status 2242 Returns a `status dict`_ with the now muted status
2243 """ 2243 """
2244 id = self.__unpack_id(id) 2244 id = self.__unpack_id(id)
2245 url = '/api/v1/statuses/{0}/mute'.format(str(id)) 2245 url = '/api/v1/statuses/{0}/mute'.format(str(id))
@@ -2250,7 +2250,7 @@ class Mastodon:
2250 """ 2250 """
2251 Unmute notifications for a status. 2251 Unmute notifications for a status.
2252 2252
2253 Returns a `toot dict`_ with the status that used to be muted. 2253 Returns a `status dict`_ with the status that used to be muted.
2254 """ 2254 """
2255 id = self.__unpack_id(id) 2255 id = self.__unpack_id(id)
2256 url = '/api/v1/statuses/{0}/unmute'.format(str(id)) 2256 url = '/api/v1/statuses/{0}/unmute'.format(str(id))
@@ -2261,7 +2261,7 @@ class Mastodon:
2261 """ 2261 """
2262 Pin a status for the logged-in user. 2262 Pin a status for the logged-in user.
2263 2263
2264 Returns a `toot dict`_ with the now pinned status 2264 Returns a `status dict`_ with the now pinned status
2265 """ 2265 """
2266 id = self.__unpack_id(id) 2266 id = self.__unpack_id(id)
2267 url = '/api/v1/statuses/{0}/pin'.format(str(id)) 2267 url = '/api/v1/statuses/{0}/pin'.format(str(id))
@@ -2272,7 +2272,7 @@ class Mastodon:
2272 """ 2272 """
2273 Unpin a pinned status for the logged-in user. 2273 Unpin a pinned status for the logged-in user.
2274 2274
2275 Returns a `toot dict`_ with the status that used to be pinned. 2275 Returns a `status dict`_ with the status that used to be pinned.
2276 """ 2276 """
2277 id = self.__unpack_id(id) 2277 id = self.__unpack_id(id)
2278 url = '/api/v1/statuses/{0}/unpin'.format(str(id)) 2278 url = '/api/v1/statuses/{0}/unpin'.format(str(id))
@@ -2283,7 +2283,7 @@ class Mastodon:
2283 """ 2283 """
2284 Bookmark a status as the logged-in user. 2284 Bookmark a status as the logged-in user.
2285 2285
2286 Returns a `toot dict`_ with the now bookmarked status 2286 Returns a `status dict`_ with the now bookmarked status
2287 """ 2287 """
2288 id = self.__unpack_id(id) 2288 id = self.__unpack_id(id)
2289 url = '/api/v1/statuses/{0}/bookmark'.format(str(id)) 2289 url = '/api/v1/statuses/{0}/bookmark'.format(str(id))
@@ -2294,7 +2294,7 @@ class Mastodon:
2294 """ 2294 """
2295 Unbookmark a bookmarked status for the logged-in user. 2295 Unbookmark a bookmarked status for the logged-in user.
2296 2296
2297 Returns a `toot dict`_ with the status that used to be bookmarked. 2297 Returns a `status dict`_ with the status that used to be bookmarked.
2298 """ 2298 """
2299 id = self.__unpack_id(id) 2299 id = self.__unpack_id(id)
2300 url = '/api/v1/statuses/{0}/unbookmark'.format(str(id)) 2300 url = '/api/v1/statuses/{0}/unbookmark'.format(str(id))
@@ -2310,7 +2310,7 @@ class Mastodon:
2310 2310
2311 New time must be at least 5 minutes into the future. 2311 New time must be at least 5 minutes into the future.
2312 2312
2313 Returns a `scheduled toot dict`_ 2313 Returns a `scheduled status dict`_
2314 """ 2314 """
2315 scheduled_at = self.__consistent_isoformat_utc(scheduled_at) 2315 scheduled_at = self.__consistent_isoformat_utc(scheduled_at)
2316 id = self.__unpack_id(id) 2316 id = self.__unpack_id(id)
@@ -2420,7 +2420,7 @@ class Mastodon:
2420 """ 2420 """
2421 Follow a remote user by uri (username@domain). 2421 Follow a remote user by uri (username@domain).
2422 2422
2423 Returns a `user dict`_. 2423 Returns a `account dict`_.
2424 """ 2424 """
2425 params = self.__generate_params(locals()) 2425 params = self.__generate_params(locals())
2426 return self.__api_request('POST', '/api/v1/follows', params) 2426 return self.__api_request('POST', '/api/v1/follows', params)
@@ -2508,7 +2508,7 @@ class Mastodon:
2508 `fields` can be a list of up to four name-value pairs (specified as tuples) to 2508 `fields` can be a list of up to four name-value pairs (specified as tuples) to
2509 appear as semi-structured information in the user's profile. 2509 appear as semi-structured information in the user's profile.
2510 2510
2511 Returns the updated `user dict` of the logged-in user. 2511 Returns the updated `account dict` of the logged-in user.
2512 """ 2512 """
2513 params_initial = collections.OrderedDict(locals()) 2513 params_initial = collections.OrderedDict(locals())
2514 2514
@@ -2567,7 +2567,7 @@ class Mastodon:
2567 """ 2567 """
2568 Set a note (visible to the logged in user only) for the given account. 2568 Set a note (visible to the logged in user only) for the given account.
2569 2569
2570 Returns a `toot dict`_ with the `note` updated. 2570 Returns a `status dict`_ with the `note` updated.
2571 """ 2571 """
2572 id = self.__unpack_id(id) 2572 id = self.__unpack_id(id)
2573 params = self.__generate_params(locals(), ["id"]) 2573 params = self.__generate_params(locals(), ["id"])
@@ -3357,7 +3357,7 @@ class Mastodon:
3357 """ 3357 """
3358 Admin version of `trending_statuses()`_. Includes unapproved tags. 3358 Admin version of `trending_statuses()`_. Includes unapproved tags.
3359 3359
3360 Returns a list of `toot dicts`_, sorted by the instance's trending algorithm, 3360 Returns a list of `status dicts`_, sorted by the instance's trending algorithm,
3361 descending. 3361 descending.
3362 """ 3362 """
3363 params = self.__generate_params(locals()) 3363 params = self.__generate_params(locals())
Powered by cgit v1.2.3 (git 2.41.0)