diff options
-rw-r--r-- | docs/index.rst | 15 | ||||
-rw-r--r-- | mastodon/Mastodon.py | 2 |
2 files changed, 15 insertions, 2 deletions
diff --git a/docs/index.rst b/docs/index.rst index ae2eedb..c82b691 100644 --- a/docs/index.rst +++ b/docs/index.rst | |||
@@ -299,8 +299,21 @@ Hashtag dicts | |||
299 | { | 299 | { |
300 | 'name': # Hashtag name (not including the #) | 300 | 'name': # Hashtag name (not including the #) |
301 | 'url': # Hashtag URL (can be remote) | 301 | 'url': # Hashtag URL (can be remote) |
302 | 'history': # List of usage history dicts for up to 7 days. Not present in statuses. | ||
302 | } | 303 | } |
303 | 304 | ||
305 | Hashtag usage history dicts | ||
306 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
307 | .. _hashtag usage history dict: | ||
308 | |||
309 | .. code-block:: python | ||
310 | |||
311 | { | ||
312 | 'day': # Date of the day this history dict is for | ||
313 | 'uses': # Number of statuses using this hashtag on that day | ||
314 | 'accounts': # Number of accounts using this hashtag in at least one status on that day | ||
315 | } | ||
316 | |||
304 | Emoji dicts | 317 | Emoji dicts |
305 | ~~~~~~~~~~~ | 318 | ~~~~~~~~~~~ |
306 | .. _emoji dict: | 319 | .. _emoji dict: |
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index ace52ed..b22128f 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py | |||
@@ -1894,7 +1894,7 @@ class Mastodon: | |||
1894 | """ | 1894 | """ |
1895 | Parse dates in certain known json fields, if possible. | 1895 | Parse dates in certain known json fields, if possible. |
1896 | """ | 1896 | """ |
1897 | known_date_fields = ["created_at", "week"] | 1897 | known_date_fields = ["created_at", "week", "day"] |
1898 | for k, v in json_object.items(): | 1898 | for k, v in json_object.items(): |
1899 | if k in known_date_fields: | 1899 | if k in known_date_fields: |
1900 | try: | 1900 | try: |