Statuses

class Statuses(val client: ApiClient) : Endpoint

Collection of api endpoints related to tweets.

See also

Parameters

client

Current ApiClient instance.

Constructors

Link copied to clipboard
fun Statuses(client: ApiClient)

Creates new Statuses endpoint instance.

Properties

Link copied to clipboard
open override val client: ApiClient

Extensions

Link copied to clipboard
fun Statuses.create(    status: String,     inReplyToStatusId: Long? = null,     autoPopulateReplyMetadata: Boolean? = null,     excludeReplyUserIds: Boolean? = null,     attachmentUrl: String? = null,     mediaIds: List<Long>? = null,     possiblySensitive: Boolean? = null,     latitude: Double? = null,     longitude: Double? = null,     placeId: String? = null,     displayCoordinates: Boolean? = null,     trimUser: Boolean? = null,     enableDMCommands: Boolean? = null,     failDMCommands: Boolean? = null,     cardUri: String? = null,     tweetMode: TweetMode = TweetMode.Default,     vararg options: Option): JsonObjectApiAction<Status>

Updates the authenticating user's current status, also known as Tweeting. For each update attempt, the update text is compared with the authenticating user's recent Tweets. Any attempt that would result in duplication will be blocked, resulting in a 403 error. A user cannot submit the same status twice in a row. While not rate limited by the API, a user is limited in the number of Tweets they can create at a time. If the number of updates posted by the user reaches the current allowed limit this method will return an HTTP 403 error.

Link copied to clipboard
fun Statuses.createPollTweet(    status: String,     choices: List<String>,     minutes: Int = 1440,     vararg options: Option): ApiAction<Status>

Creates new poll tweet.

Link copied to clipboard
fun Statuses.createWithMedia(    status: String,     media: List<MediaComponent>,     vararg options: Option): ApiAction<JsonObjectResponse<Status>>

Creates new tweet with media.

Link copied to clipboard
fun Statuses.delete(    id: Long,     trimUser: Boolean? = null,     tweetMode: TweetMode = TweetMode.Default,     vararg options: Option): JsonObjectApiAction<Status>

Destroys the status specified by the required ID parameter. The authenticating user must be the author of the specified status. Returns the destroyed status if successful.

Link copied to clipboard
fun Statuses.embedFormat(    url: String,     maxWidth: Int? = null,     hideMedia: Boolean? = null,     hideThread: Boolean? = null,     omitScript: Boolean? = null,     align: EmbedAlign = EmbedAlign.Default,     related: List<String>? = null,     lang: String? = null,     theme: EmbedTheme = EmbedTheme.Default,     linkColor: String? = null,     widgetType: EmbedWidgetType = EmbedWidgetType.Default,     dnt: Boolean? = null,     vararg options: Option): JsonObjectApiAction<Embed>

Returns a single Tweet, specified by either a Tweet web URL or the Tweet ID, in an oEmbed-compatible format. The returned HTML snippet will be automatically recognized as an Embedded Tweet when Twitter's widget JavaScript is included on the page. The oEmbed endpoint allows customization of the final appearance of an Embedded Tweet by setting the corresponding properties in HTML markup to be interpreted by Twitter's JavaScript bundled with the HTML response by default. The format of the returned markup may change over time as Twitter adds new features or adjusts its Tweet representation. The Tweet fallback markup is meant to be cached on your servers for up to the suggested cache lifetime specified in the cache_age.

Link copied to clipboard
fun Statuses.lookup(    ids: List<Long>,     includeEntities: Boolean? = null,     trimUser: Boolean? = null,     map: Boolean? = null,     includeExtAltText: Boolean? = null,     includeCardUri: Boolean? = null,     tweetMode: TweetMode = TweetMode.Default,     vararg options: Option): JsonArrayApiAction<Status>

Returns fully-hydrated Tweet objects for up to 100 Tweets per request, as specified by comma-separated values passed to the id parameter. This method is especially useful to get the details (hydrate) a collection of Tweet IDs. GET statuses/show/:id is used to retrieve a single Tweet object.

Link copied to clipboard
fun Statuses.pin(id: Long, vararg options: Option): JsonObjectApiAction<PinTweet>

Pin the tweet.

Link copied to clipboard
fun Statuses.retweet(    id: Long,     trimUser: Boolean? = null,     tweetMode: TweetMode = TweetMode.Default,     vararg options: Option): JsonObjectApiAction<Status>

Retweets a tweet. Returns the original Tweet with Retweet details embedded.

Link copied to clipboard
fun Statuses.retweeterIds(    id: Long,     count: Int? = null,     cursor: Long? = null,     stringifyIds: Boolean? = null,     vararg options: Option): CursorJsonObjectApiAction<CursorIds, Long>

Returns a collection of up to 100 user IDs belonging to users who have retweeted the Tweet specified by the id parameter. This method offers similar data to GET statuses/retweets/:id.

Link copied to clipboard
fun Statuses.retweets(    id: Long,     count: Int? = null,     trimUser: Boolean? = null,     tweetMode: TweetMode = TweetMode.Default,     vararg options: Option): JsonArrayApiAction<Status>

Returns a collection of the 100 most recent retweets of the Tweet specified by the id parameter.

Link copied to clipboard
val Statuses.retweetsOfMe: JsonArrayApiAction<Status>

Shorthand property to Statuses.retweetsOfMe.

fun Statuses.retweetsOfMe(    count: Int? = null,     sinceId: Long? = null,     maxId: Long? = null,     trimUser: Boolean? = null,     includeEntities: Boolean? = null,     includeUserEntities: Boolean? = null,     tweetMode: TweetMode = TweetMode.Default,     vararg options: Option): JsonArrayApiAction<Status>

Returns the most recent Tweets authored by the authenticating user that have been retweeted by others. This timeline is a subset of the user's GET statuses/user_timeline.

Link copied to clipboard
fun Statuses.show(    id: Long,     trimUser: Boolean? = null,     includeMyRetweet: Boolean? = null,     includeEntities: Boolean? = null,     includeExtAltText: Boolean? = null,     includeCardUri: Boolean? = null,     tweetMode: TweetMode = TweetMode.Default,     vararg options: Option): JsonObjectApiAction<Status>

Returns a single Tweet, specified by the id parameter. The Tweet's author will also be embedded within the Tweet. See GET statuses/lookup for getting Tweets in bulk (up to 100 per call). See also Embedded Timelines, Embedded Tweets, and GET statuses/oembed for tools to render Tweets according to Display Requirements.

Link copied to clipboard
fun Statuses.unpin(id: Long, vararg options: Option): JsonObjectApiAction<PinTweet>

Unpin the tweet.

Link copied to clipboard
fun Statuses.unretweet(    id: Long,     trimUser: Boolean? = null,     tweetMode: TweetMode? = null,     vararg options: Option): JsonObjectApiAction<Status>

Untweets a retweeted status. Returns the original Tweet with Retweet details embedded.