aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenz Diener <[email protected]>2017-11-29 18:04:54 +0100
committerLorenz Diener <[email protected]>2017-11-29 18:04:54 +0100
commita7e2caa369639feb9c7562346dbb3d0827b37491 (patch)
tree0f71b43a7f8e56e6f5b4414ef49c0cd063c3a2cf /mastodon
parentc5970d10f904d0377df74bcbe6df28e1c27fddb0 (diff)
downloadmastodon.py-a7e2caa369639feb9c7562346dbb3d0827b37491.tar.gz
Check hashtags in streaming API
Diffstat (limited to 'mastodon')
-rw-r--r--mastodon/Mastodon.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py
index 9df51ea..2f84635 100644
--- a/mastodon/Mastodon.py
+++ b/mastodon/Mastodon.py
@@ -1044,6 +1044,8 @@ class Mastodon:
1044 a subclass of StreamListener which will receive callbacks for incoming 1044 a subclass of StreamListener which will receive callbacks for incoming
1045 events. 1045 events.
1046 """ 1046 """
1047 if tag.startswith("#"):
1048 raise MastodonIllegalArgumentError("Tag parameter should omit leading #")
1047 return self.__stream("/api/v1/streaming/hashtag?tag={}".format(tag), listener) 1049 return self.__stream("/api/v1/streaming/hashtag?tag={}".format(tag), listener)
1048 1050
1049 ### 1051 ###
Powered by cgit v1.2.3 (git 2.41.0)