Document hashtag history dicts
This commit is contained in:
pare
d3594572bb
commit
f864bea4e5
S'han modificat 2 arxius amb 15 adicions i 2 eliminacions
|
@ -299,6 +299,19 @@ Hashtag dicts
|
||||||
{
|
{
|
||||||
'name': # Hashtag name (not including the #)
|
'name': # Hashtag name (not including the #)
|
||||||
'url': # Hashtag URL (can be remote)
|
'url': # Hashtag URL (can be remote)
|
||||||
|
'history': # List of usage history dicts for up to 7 days. Not present in statuses.
|
||||||
|
}
|
||||||
|
|
||||||
|
Hashtag usage history dicts
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
.. _hashtag usage history dict:
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
{
|
||||||
|
'day': # Date of the day this history dict is for
|
||||||
|
'uses': # Number of statuses using this hashtag on that day
|
||||||
|
'accounts': # Number of accounts using this hashtag in at least one status on that day
|
||||||
}
|
}
|
||||||
|
|
||||||
Emoji dicts
|
Emoji dicts
|
||||||
|
|
|
@ -1894,7 +1894,7 @@ class Mastodon:
|
||||||
"""
|
"""
|
||||||
Parse dates in certain known json fields, if possible.
|
Parse dates in certain known json fields, if possible.
|
||||||
"""
|
"""
|
||||||
known_date_fields = ["created_at", "week"]
|
known_date_fields = ["created_at", "week", "day"]
|
||||||
for k, v in json_object.items():
|
for k, v in json_object.items():
|
||||||
if k in known_date_fields:
|
if k in known_date_fields:
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Referencia en una nova incidència