MCPcopy Index your code
hub / github.com/ryanmcgrath/twython / on_success

Method on_success

twython/streaming/api.py:165–177  ·  view source on GitHub ↗

Called when data has been successfully received from the stream. Returns True if other handlers for this message should be invoked. Feel free to override this to handle your streaming data how you want it handled. See https://developer.twitter.com/en/docs/tweets/filt

(self, data)

Source from the content-addressed store, hash-verified

163 response.close()
164
165 def on_success(self, data): # pragma: no cover
166 """Called when data has been successfully received from the stream.
167 Returns True if other handlers for this message should be invoked.
168
169 Feel free to override this to handle your streaming data how you
170 want it handled. See
171 https://developer.twitter.com/en/docs/tweets/filter-realtime/guides/streaming-message-types
172 for messages sent along in stream responses.
173
174 :param data: data recieved from the stream
175 :type data: dict
176 """
177 return True
178
179 def on_error(self, status_code, data, headers=None): # pragma: no cover
180 """Called when stream returns non-200 status code

Callers 1

_requestMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected