Struct twitter_stream::TwitterStreamBuilder
[−]
[src]
pub struct TwitterStreamBuilder<'a> { /* fields omitted */ }
A builder for TwitterStream
.
Methods
impl<'a> TwitterStreamBuilder<'a>
[src]
fn filter(token: &'a Token<'a>) -> Self
Create a builder for POST statuses/filter
endpoint.
See the Twitter Developer Documentation for more information.
fn sample(token: &'a Token<'a>) -> Self
Create a builder for GET statuses/sample
endpoint.
See the Twitter Developer Documentation for more information.
fn user(token: &'a Token<'a>) -> Self
Create a builder for GET user
endpoint (a.k.a. User Stream).
See the Twitter Developer Documentation for more information.
fn custom(
method: RequestMethod,
end_point: &'a str,
token: &'a Token<'a>
) -> Self
method: RequestMethod,
end_point: &'a str,
token: &'a Token<'a>
) -> Self
Constructs a builder for a Stream at a custom end point.
fn stall_warnings(&mut self, stall_warnings: bool) -> &mut Self
Set whether to receive messages when in danger of being disconnected.
See the Twitter Developer Documentation for more information.
fn filter_level(&mut self, filter_level: FilterLevel) -> &mut Self
Set the minimum filter_level
Tweet attribute to receive. The default is FilterLevel::None
.
See the Twitter Developer Documentation for more information.
fn replies(&mut self, replies: bool) -> &mut Self
Set whether to receive all @replies.
See the Twitter Developer Documentation for more information.
fn client<T: Into<Option<&'a Client>>>(&mut self, client: T) -> &mut Self
Set a custom hyper::client::Client
object to use when connecting to the Stream.
fn user_agent<T: Into<Option<&'a str>>>(&mut self, user_agent: T) -> &mut Self
Set a user agent string to be sent when connectiong to the Stream.
fn language<T: Into<Option<&'a str>>>(&mut self, language: T) -> &mut Self
Set a comma-separated language identifiers to receive Tweets written in the specified languages only.
See the Twitter Developer Documentation for more information.
fn follow<T: Into<Option<&'a [UserId]>>>(&mut self, follow: T) -> &mut Self
Set a list of user IDs to receive Tweets only from the specified users.
See the [Twitter Developer Documentation][1] for more information. [1] https://dev.twitter.com/streaming/overview/request-parameters#follow
fn track<T: Into<Option<&'a str>>>(&mut self, track: T) -> &mut Self
A comma separated list of phrases to filter Tweets by.
See the Twitter Developer Documentation for more information.
fn locations<T: Into<Option<&'a [((f64, f64), (f64, f64))]>>>(
&mut self,
locations: T
) -> &mut Self
&mut self,
locations: T
) -> &mut Self
Set a list of bounding boxes to filter Tweets by, specified by a pair of coordinates in the form of ((longitude, latitude), (longitude, latitude)) tuple.
See the Twitter Developer Documentation for more information.
fn count<T: Into<Option<i32>>>(&mut self, count: T) -> &mut Self
The count
parameter. This parameter requires elevated access to use.
See the Twitter Developer Documentation for more information.
fn with<T: Into<Option<With>>>(&mut self, with: T) -> &mut Self
Set types of messages delivered to User and Site Streams clients.
impl<'a> TwitterStreamBuilder<'a>
[src]
fn listen(&self) -> Result<TwitterStream>
Attempt to start listening on a Stream and returns a Stream
object which yields parsed messages from the API.
fn listen_json(&self) -> Result<TwitterJsonStream>
Attempt to start listening on a Stream and returns a Stream
which yields JSON messages from the API.
Trait Implementations
impl<'a> Clone for TwitterStreamBuilder<'a>
[src]
fn clone(&self) -> TwitterStreamBuilder<'a>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more