Class | Twitter::Streaming::Client |
In: |
lib/twitter/streaming/client.rb
|
Parent: | Twitter::Client |
connection | [W] | |
ssl_socket_class | [RW] | |
tcp_socket_class | [RW] |
Initializes a new Client object
@param options [Hash] A customizable set of options. @option options [String] :tcp_socket_class A class that Connection will use to create a new TCP socket. @option options [String] :ssl_socket_class A class that Connection will use to create a new SSL socket. @return [Twitter::Streaming::Client]
Returns public statuses that match one or more filter predicates
@see dev.twitter.com/streaming/reference/post/statuses/filter @see dev.twitter.com/streaming/overview/request-parameters @note At least one predicate parameter (follow, locations, or track) must be specified. @param options [Hash] A customizable set of options. @option options [String] :follow A comma separated list of user IDs, indicating the users to return statuses for in the stream. @option options [String] :track Includes additional Tweets matching the specified keywords. Phrases of keywords are specified by a comma-separated list. @option options [String] :locations Includes additional Tweets falling within the specified bounding boxes. @yield [Twitter::Tweet, Twitter::Streaming::Event, Twitter::DirectMessage, Twitter::Streaming::FriendList, Twitter::Streaming::DeletedTweet, Twitter::Streaming::StallWarning] A stream of Twitter objects.
Returns all public statuses
@see dev.twitter.com/streaming/reference/get/statuses/firehose @see dev.twitter.com/streaming/overview/request-parameters @note This endpoint requires special permission to access. @param options [Hash] A customizable set of options. @option options [Integer] :count The number of messages to backfill. @yield [Twitter::Tweet, Twitter::Streaming::Event, Twitter::DirectMessage, Twitter::Streaming::FriendList, Twitter::Streaming::DeletedTweet, Twitter::Streaming::StallWarning] A stream of Twitter objects.
Returns a small random sample of all public statuses
@see dev.twitter.com/streaming/reference/get/statuses/sample @see dev.twitter.com/streaming/overview/request-parameters @yield [Twitter::Tweet, Twitter::Streaming::Event, Twitter::DirectMessage, Twitter::Streaming::FriendList, Twitter::Streaming::DeletedTweet, Twitter::Streaming::StallWarning] A stream of Twitter objects.
Streams messages for a set of users
@see dev.twitter.com/streaming/reference/get/site @see dev.twitter.com/streaming/sitestreams @see dev.twitter.com/streaming/overview/request-parameters @note Site Streams is currently in a limited beta. Access is restricted to whitelisted accounts. @overload site(*follow, options = {}, &block)
@param follow [Enumerable<Integer, String, Twitter::User>] A list of user IDs, indicating the users to return statuses for in the stream. @param options [Hash] A customizable set of options. @option options [String] :with Specifies whether to return information for just the users specified in the follow parameter, or include messages from accounts they follow. @option options [String] :replies Specifies whether stall warnings should be delivered. @yield [Twitter::Tweet, Twitter::Streaming::Event, Twitter::DirectMessage, Twitter::Streaming::FriendList, Twitter::Streaming::DeletedTweet, Twitter::Streaming::StallWarning] A stream of Twitter objects.
Streams messages for a single user
@see dev.twitter.com/streaming/reference/get/user @see dev.twitter.com/streaming/userstreams @see dev.twitter.com/streaming/overview/request-parameters @param options [Hash] A customizable set of options. @option options [String] :with Specifies whether to return information for just the users specified in the follow parameter, or include messages from accounts they follow. @option options [String] :replies Specifies whether to return additional @replies. @option options [String] :stall_warnings Specifies whether stall warnings should be delivered. @option options [String] :track Includes additional Tweets matching the specified keywords. Phrases of keywords are specified by a comma-separated list. @option options [String] :locations Includes additional Tweets falling within the specified bounding boxes. @yield [Twitter::Tweet, Twitter::Streaming::Event, Twitter::DirectMessage, Twitter::Streaming::FriendList, Twitter::Streaming::DeletedTweet, Twitter::Streaming::StallWarning] A stream of Twitter objects.