class documentation
class TweetHandlerI(BasicTweetHandler): (source)
Known subclasses: nltk.twitter.twitterclient.TweetViewer, nltk.twitter.twitterclient.TweetWriter
Constructor: TweetHandlerI(limit, upper_date_limit, lower_date_limit)
Interface class whose subclasses should implement a handle method that Twitter clients can delegate to.
| Method | __init__ |
No summary |
| Method | check |
Validate date limits. |
| Method | handle |
Deal appropriately with data returned by the Twitter API |
| Method | on |
Actions when the tweet limit has been reached |
| Instance Variable | do |
Stores the id of the last fetched Tweet to handle pagination. |
| Instance Variable | lower |
Undocumented |
| Instance Variable | startingup |
Undocumented |
| Instance Variable | upper |
Undocumented |
Inherited from BasicTweetHandler:
| Method | do |
Returns False if the client should stop fetching Tweets. |
| Instance Variable | counter |
A flag to indicate to the client whether to stop fetching data given some condition (e.g., reaching a date limit). |
| Instance Variable | limit |
Undocumented |
| Instance Variable | max |
Undocumented |
overridden in
nltk.twitter.twitterclient.TweetWriter| Parameters | |
| limit | Undocumented |
| upper | Undocumented |
| lower | Undocumented |
| int limit | The number of data items to process in the current round of processing. |
| tuple upper | The date at which to stop collecting new data. This should be entered as a tuple which can serve as the argument to datetime.datetime. E.g. date_limit=(2015, 4, 1, 12, 40) for 12:30 pm on April 1 2015. |
| tuple lower | The date at which to stop collecting new data. See upper_data_limit for formatting. |