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)
| 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 |