Stream

class Stream(val client: ApiClient) : Endpoint

Collection of api endpoints related to Streaming API.

See also

Parameters

client

Current ApiClient instance.

Constructors

Link copied to clipboard
fun Stream(client: ApiClient)

Creates new Stream endpoint instance.

Properties

Link copied to clipboard
open override val client: ApiClient

Extensions

Link copied to clipboard
fun Stream.filter(    follow: List<Long>? = null,     track: List<String>? = null,     locations: List<Pair<Double, Double>>? = null,     delimited: StreamDelimitedBy = StreamDelimitedBy.Default,     stallWarnings: Boolean? = null,     language: String? = null,     vararg options: Option): StreamApiAction<FilterStreamListener, FilterStreamHandler>

Returns public statuses that match one or more filter predicates. Multiple parameters may be specified which allows most clients to use a single connection to the Streaming API. Both GET and POST requests are supported, but GET requests with too many parameters may cause the request to be rejected for excessive URL length. Use a POST request to avoid long URLs. The track, follow, and locations fields should be considered to be combined with an OR operator. track=foo&follow=1234 returns Tweets matching "foo" OR created by user 1234. The default access level allows up to 400 track keywords, 5,000 follow userids and 25 0.1-360 degree location boxes. If you need access to more rules and filtering tools, please apply for enterprise access.

Link copied to clipboard

Shorthand property to Stream.sample.

fun Stream.sample(    delimited: StreamDelimitedBy = StreamDelimitedBy.Default,     stallWarnings: Boolean? = null,     language: String? = null,     vararg options: Option): StreamApiAction<SampleStreamListener, SampleStreamHandler>

Returns a small random sample of all public statuses via a stream. The Tweets returned by the default access level are the same, so if two different clients connect to this endpoint, they will see the same Tweets.

Link copied to clipboard

Shorthand property to Stream.tweetstorm.

fun Stream.tweetstorm(    customHost: EndpointHost = EndpointHost.UserStream,     delimited: StreamDelimitedBy = StreamDelimitedBy.Default,     stringifyFriendIds: Boolean? = null,     vararg options: Option): StreamApiAction<TweetstormListener, TweetstormHandler>

Connects to Tweetstorm with custom EndpointHost.

fun Stream.tweetstorm(    customHost: String,     delimited: StreamDelimitedBy = StreamDelimitedBy.Default,     stringifyFriendIds: Boolean? = null,     vararg options: Option): StreamApiAction<TweetstormListener, TweetstormHandler>

Connects to Tweetstorm with custom host.

Link copied to clipboard
fun Stream.user(    delimited: StreamDelimitedBy = StreamDelimitedBy.Default,     stallWarnings: Boolean? = null,     with: UserStreamWith = UserStreamWith.Default,     replies: UserStreamReplies = UserStreamReplies.Default,     track: List<String>? = null,     filterLevel: UserStreamFilterLevel = UserStreamFilterLevel.Default,     language: String? = null,     follow: List<Long>? = null,     locations: List<Pair<Double, Double>>? = null,     count: Int? = null,     includeFollowingsActivity: Boolean? = null,     stringifyFriendIds: Boolean? = null,     vararg options: Option): StreamApiAction<UserStreamListener, UserStreamHandler>

Returns realtime timeline.