public interface StatusesService
| Modifier and Type | Method and Description |
|---|---|
<any> |
destroy(Long id,
Boolean trimUser)
Destroys the status specified by the required ID parameter.
|
<any> |
homeTimeline(Integer count,
Long sinceId,
Long maxId,
Boolean trimUser,
Boolean excludeReplies,
Boolean contributeDetails,
Boolean includeEntities)
Returns a collection of the most recent Tweets and retweets posted by the authenticating user
and the users they follow.
|
<any> |
lookup(String id,
Boolean includeEntities,
Boolean trimUser,
Boolean map)
Returns fully-hydrated Tweet objects for up to 100 tweets per request, as specified by
comma-separated values passed to the id parameter.
|
<any> |
mentionsTimeline(Integer count,
Long sinceId,
Long maxId,
Boolean trimUser,
Boolean contributeDetails,
Boolean includeEntities)
Returns most recent mentions (tweets containing a user's @screen_name) for the
authenticating user, by default returns 20 tweets.
|
<any> |
retweet(Long id,
Boolean trimUser)
Retweets a Tweet.
|
<any> |
retweetsOfMe(Integer count,
Long sinceId,
Long maxId,
Boolean trimUser,
Boolean includeEntities,
Boolean includeUserEntities)
Returns the most recent tweets authored by the authenticating user that have been retweeted
by others.
|
<any> |
show(Long id,
Boolean trimUser,
Boolean includeMyRetweet,
Boolean includeEntities)
Returns a single Tweet, specified by the id parameter.
|
<any> |
unretweet(Long id,
Boolean trimUser)
Destroys the retweet specified by the required source Tweet's ID parameter.
|
<any> |
update(String status,
Long inReplyToStatusId,
Boolean possiblySensitive,
Double latitude,
Double longitude,
String placeId,
Boolean displayCoordinates,
Boolean trimUser,
String mediaIds)
Updates the authenticating user's current status, also known as tweeting.
|
<any> |
userTimeline(Long userId,
String screenName,
Integer count,
Long sinceId,
Long maxId,
Boolean trimUser,
Boolean excludeReplies,
Boolean contributeDetails,
Boolean includeRetweets)
Returns a collection of the most recent tweets posted by the user indicated by the
screen_name or user_id parameters.
|
<any> mentionsTimeline(Integer count,
Long sinceId,
Long maxId,
Boolean trimUser,
Boolean contributeDetails,
Boolean includeEntities)
The timeline returned is the equivalent of the one seen when you view your mentions on twitter.com.
The Twitter REST API goes back up to 800 tweets.
count - (optional) Specifies the number of tweets to try and retrieve, up to a maximum
of 200. The value of count is best thought of as a limit to the number of tweets
to return because suspended or deleted content is removed after the count has
been applied. We include retweets in the count, even if include_rts is not
supplied. It is recommended you always send include_rts=1 when using this API
method.sinceId - (optional) Returns results with an ID greater than (that is, more recent than)
the specified ID. There are limits to the number of tweets which can be
accessed through the API. If the limit of tweets has occurred since the
since_id, the since_id will be forced to the oldest ID available.maxId - (optional) Returns results with an ID less than (that is, older than) or equal
to the specified ID.trimUser - (optional) When set to either true, t or 1, each Tweet returned in a timeline
will include a user object including only the status authors numerical ID.
Omit this parameter to receive the complete user object.contributeDetails - (optional) This parameter enhances the contributors element of the
status response to include the screen_name of the contributor. By
default only the user_id of the contributor is included.includeEntities - (optional) The entities node will be disincluded when set to false.<any> userTimeline(Long userId,
String screenName,
Integer count,
Long sinceId,
Long maxId,
Boolean trimUser,
Boolean excludeReplies,
Boolean contributeDetails,
Boolean includeRetweets)
User timelines belonging to protected users may only be requested when the authenticated user either "owns" the timeline or is an approved follower of the owner.
The timeline returned is the equivalent of the one seen when you view a user's profile on twitter.com.
The Twitter REST API goes back up to 3,200 of a user's most recent tweets. Native retweets of other statuses by the user is included in this total, regardless of whether include_rts is set to false when requesting this resource.
Always specify either an user_id or screen_name when requesting a user timeline.
userId - (optional) The ID of the user for whom to return results for.screenName - (optional) The screen name of the user for whom to return results for.count - (optional) Specifies the number of tweets to try and retrieve, up to a maximum
of 200. The value of count is best thought of as a limit to the number of tweets
to return because suspended or deleted content is removed after the count has
been applied. We include retweets in the count, even if include_rts is not
supplied. It is recommended you always send include_rts=1 when using this API
method.sinceId - (optional) Returns results with an ID greater than (that is, more recent than)
the specified ID. There are limits to the number of tweets which can be
accessed through the API. If the limit of tweets has occurred since the
since_id, the since_id will be forced to the oldest ID available.maxId - (optional) Returns results with an ID less than (that is, older than) or equal
to the specified ID.trimUser - (optional) When set to either true, t or 1, each Tweet returned in a timeline
will include a user object including only the status authors numerical ID.
Omit this parameter to receive the complete user object.excludeReplies - (optional) This parameter will prevent replies from appearing in the
returned timeline. Using exclude_replies with the count parameter will
mean you will receive up-to count tweets — this is because the count
parameter retrieves that many tweets before filtering out retweets and
replies. This parameter is only supported for JSON and XML responses.contributeDetails - (optional) This parameter enhances the contributors element of the
status response to include the screen_name of the contributor. By
default only the user_id of the contributor is included.includeRetweets - (optional) When set to false, the timeline will strip any native
retweets (though they will still count toward both the maximal length
of the timeline and the slice selected by the count parameter).
Note: If you're using the trim_user parameter in conjunction with
include_rts, the retweets will still contain a full user object.<any> homeTimeline(Integer count,
Long sinceId,
Long maxId,
Boolean trimUser,
Boolean excludeReplies,
Boolean contributeDetails,
Boolean includeEntities)
The Twitter REST API goes back up to 800 tweets on the home timeline. It is more volatile for users that follow many users or follow users who Tweet frequently.
count - (optional) Specifies the number of tweets to try and retrieve, up to a maximum
of 200. The value of count is best thought of as a limit to the number of tweets
to return because suspended or deleted content is removed after the count has
been applied. We include retweets in the count, even if include_rts is not
supplied. It is recommended you always send include_rts=1 when using this API
method.sinceId - (optional) Returns results with an ID greater than (that is, more recent than)
the specified ID. There are limits to the number of Tweets which can be
accessed through the API. If the limit of Tweets has occurred since the
since_id, the since_id will be forced to the oldest ID available.maxId - (optional) Returns results with an ID less than (that is, older than) or equal
to the specified ID.trimUser - (optional) When set to either true, t or 1, each Tweet returned in a timeline
will include a user object including only the status authors numerical ID.
Omit this parameter to receive the complete user object.excludeReplies - (optional) This parameter will prevent replies from appearing in the
returned timeline. Using exclude_replies with the count parameter will
mean you will receive up-to count tweets — this is because the count
parameter retrieves that many tweets before filtering out retweets and
replies. This parameter is only supported for JSON and XML responses.contributeDetails - (optional) This parameter enhances the contributors element of the
status response to include the screen_name of the contributor. By
default only the user_id of the contributor is included.includeEntities - (optional) The entities node will be disincluded when set to false.<any> retweetsOfMe(Integer count,
Long sinceId,
Long maxId,
Boolean trimUser,
Boolean includeEntities,
Boolean includeUserEntities)
count - (optional) Specifies the number of tweets to try and retrieve, up to a maximum
of 200. The value of count is best thought of as a limit to the number of tweets
to return because suspended or deleted content is removed after the count has
been applied. We include retweets in the count, even if include_rts is not
supplied. It is recommended you always send include_rts=1 when using this API
method.sinceId - (optional) Returns results with an ID greater than (that is, more recent than)
the specified ID. There are limits to the number of Tweets which can be
accessed through the API. If the limit of Tweets has occurred since the
since_id, the since_id will be forced to the oldest ID available.maxId - (optional) Returns results with an ID less than (that is, older than) or equal
to the specified ID.trimUser - (optional) When set to either true, t or 1, each Tweet returned in a timeline
will include a user object including only the status authors numerical ID.
Omit this parameter to receive the complete user object.includeEntities - (optional) The entities node will be disincluded when set to false.includeUserEntities - (optional) The user entities node will not be included when set to
false.<any> show(Long id,
Boolean trimUser,
Boolean includeMyRetweet,
Boolean includeEntities)
id - (required) The numerical ID of the desired Tweet.trimUser - (optional) When set to either true, t or 1, each Tweet returned in a timeline
will include a user object including only the status authors numerical ID.
Omit this parameter to receive the complete user object.includeMyRetweet - (optional) When set to either true, t or 1, any Tweets returned that
have been retweeted by the authenticating user will include an
additional current_user_retweet node, containing the ID of the source
status for the retweet.includeEntities - (optional) The entities node will be disincluded when set to false.<any> lookup(String id,
Boolean includeEntities,
Boolean trimUser,
Boolean map)
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.
There are a few things to note when using this method.
id - (required) The comma separated ids of the desired Tweets as a string.includeEntities - (optional) The entities node will be disincluded when set to false.trimUser - (optional) When set to either true, t or 1, each Tweet returned in a timeline
will include a user object including only the status authors numerical ID.
Omit this parameter to receive the complete user object.map - (optional) When using the map parameter, tweets that do not exist or cannot be
viewed by the current user will still have their key represented but with an
explicitly null value paired with it<any> update(String status,
Long inReplyToStatusId,
Boolean possiblySensitive,
Double latitude,
Double longitude,
String placeId,
Boolean displayCoordinates,
Boolean trimUser,
String mediaIds)
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. Therefore, 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.
status - (required) The text of your status update, typically up to 140 characters. URL
encode as necessary. [node:840,title="t.co link wrapping"] may effect character
counts. There are some special commands in this field to be aware of. For
instance, preceding a message with "D " or "M " and following it with a screen
name can create a direct message to that user if the relationship allows for
it.inReplyToStatusId - (optional) The ID of an existing status that the update is in reply
to. Note:: This parameter will be ignored unless the author of the
Tweet this parameter references is mentioned within the status text.
Therefore, you must include @username, where username is the author
of the referenced Tweet, within the update.possiblySensitive - (optional) If you upload Tweet media that might be considered
sensitive content such as nudity, violence, or medical procedures,
you should set this value to true. See Media setting and best
practices for more context. Defaults to false.latitude - (optional) The latitude of the location this Tweet refers to. This parameter
will be ignored unless it is inside the range -90.0 to +90.0 (North is
positive) inclusive. It will also be ignored if there isn't a corresponding
long parameter.longitude - (optional) The longitude of the location this Tweet refers to. The valid
ranges for longitude is -180.0 to +180.0 (East is positive) inclusive. This
parameter will be ignored if outside that range, if it is not a number, if
geo_enabled is disabled, or if there not a corresponding lat parameter.placeId - (optional) A place in the world. These IDs can be retrieved from [node:29].displayCoordinates - (optional) Whether or not to put a pin on the exact coordinates a
Tweet has been sent from.trimUser - (optional) When set to either true, t or 1, each Tweet returned in a timeline
will include a user object including only the status authors numerical ID.
Omit this parameter to receive the complete user object.mediaIds - A comma separated media ids as a string for uploaded media to associate
with a Tweet. You may include up to 4 photos in a Tweet.<any> retweet(Long id,
Boolean trimUser)
id - (required) The numerical ID of the desired Tweet.trimUser - (optional) When set to either true, t or 1, each Tweet returned in a timeline
will include a user object including only the status authors numerical ID.
Omit this parameter to receive the complete user object.<any> destroy(Long id,
Boolean trimUser)
id - (required) The numerical ID of the desired Tweet.trimUser - (optional) When set to either true, t or 1, each Tweet returned in a timeline
will include a user object including only the status authors numerical ID.
Omit this parameter to receive the complete user object.<any> unretweet(Long id,
Boolean trimUser)
id - (required) The numerical ID of the source Tweet.trimUser - (optional) When set to either true, t or 1, each Tweet returned in a timeline
will include a user object including only the status authors numerical ID.
Omit this parameter to receive the complete user object.