add hashtag leading # detection, closes #105
This commit is contained in:
pare
961425e2ab
commit
1c64c39701
S'han modificat 1 arxius amb 5 adicions i 1 eliminacions
|
@ -291,12 +291,16 @@ class Mastodon:
|
||||||
|
|
||||||
def timeline_hashtag(self, hashtag, local=False, max_id=None, since_id=None, limit=None):
|
def timeline_hashtag(self, hashtag, local=False, max_id=None, since_id=None, limit=None):
|
||||||
"""
|
"""
|
||||||
Fetch a timeline of toots with a given hashtag.
|
Fetch a timeline of toots with a given hashtag. The hashtag parameter
|
||||||
|
should not contain the leading #.
|
||||||
|
|
||||||
Set "local" to True to retrieve only instance-local tagged posts.
|
Set "local" to True to retrieve only instance-local tagged posts.
|
||||||
|
|
||||||
Returns a list of toot dicts.
|
Returns a list of toot dicts.
|
||||||
"""
|
"""
|
||||||
|
if hashtag.startswith("#"):
|
||||||
|
throw MastodonIllegalArgumentError("Hashtag parameter should omit leading #")
|
||||||
|
|
||||||
if max_id != None:
|
if max_id != None:
|
||||||
max_id = self.__unpack_id(max_id)
|
max_id = self.__unpack_id(max_id)
|
||||||
|
|
||||||
|
|
Loading…
Referencia en una nova incidència