public interface TweetsResources
Modifier and Type | Method and Description |
---|---|
Status |
destroyStatus(long statusId)
Destroys the status specified by the required ID parameter.
Usage note: The authenticating user must be the author of the specified status. |
OEmbed |
getOEmbed(OEmbedRequest req)
Returns information allowing the creation of an embedded representation of a Tweet on third party sites.
|
IDs |
getRetweeterIds(long statusId,
int count,
long cursor)
Returns a collection of up to
count user IDs belonging to users
who have retweeted the tweet specified by the id parameter. |
IDs |
getRetweeterIds(long statusId,
long cursor)
Returns a collection of up to 100 user IDs belonging to users who have
retweeted the tweet specified by the id parameter.
|
ResponseList<Status> |
getRetweets(long statusId)
Returns up to 100 of the first retweets of a given tweet.
|
ResponseList<Status> |
lookup(long... ids)
Returns fully-hydrated tweet objects for up to 100 tweets per request, as specified by comma-separated values passed to the id parameter.
|
Status |
retweetStatus(long statusId)
Retweets a tweet.
|
Status |
showStatus(long id)
Returns a single status, specified by the id parameter below.
|
Status |
unRetweetStatus(long statusId)
Untweets a retweeted status.
|
Status |
updateStatus(StatusUpdate latestStatus)
Updates the authenticating user's status.
|
Status |
updateStatus(String status)
Updates the authenticating user's status.
|
UploadedMedia |
uploadMedia(File mediaFile)
Uploads media image to be attached via
updateStatus(twitter4j.StatusUpdate)
This method calls https://api.twitter.com/1.1/media/upload.json |
UploadedMedia |
uploadMedia(String fileName,
InputStream media)
Uploads media image to be attached via
updateStatus(twitter4j.StatusUpdate)
This method calls https://api.twitter.com/1.1/media/upload.json |
UploadedMedia |
uploadMediaChunked(String fileName,
InputStream media)
Uploads media using chunked approach to be attached via
updateStatus(twitter4j.StatusUpdate) . |
ResponseList<Status> getRetweets(long statusId) throws TwitterException
statusId
- The numerical ID of the tweet you want the retweets of.TwitterException
- when Twitter service or network is unavailableIDs getRetweeterIds(long statusId, long cursor) throws TwitterException
statusId
- The numerical ID of the tweet you want the retweeters of.cursor
- The cursor of the page to fetch. Use -1 to start.TwitterException
- when Twitter service or network is unavailableIDs getRetweeterIds(long statusId, int count, long cursor) throws TwitterException
count
user IDs belonging to users
who have retweeted the tweet specified by the id parameter.
statusId
- The numerical ID of the tweet you want the retweeters of.count
- The maximum number of retweeter IDs to retrieve. Must be
between 1 and 200, inclusive.cursor
- The cursor of the page to fetch. Use -1 to start.TwitterException
- when Twitter service or network is unavailableStatus showStatus(long id) throws TwitterException
id
- the numerical ID of the status you're trying to retrieveTwitterException
- when Twitter service or network is unavailableStatus destroyStatus(long statusId) throws TwitterException
statusId
- The ID of the status to destroy.TwitterException
- when Twitter service or network is unavailableStatus updateStatus(String status) throws TwitterException
status
- the text of your status updateTwitterException
- when Twitter service or network is unavailableStatus updateStatus(StatusUpdate latestStatus) throws TwitterException
latestStatus
- the latest status to be updated.TwitterException
- when Twitter service or network is unavailableStatus retweetStatus(long statusId) throws TwitterException
statusId
- The ID of the status to retweet.TwitterException
- when Twitter service or network is unavailableStatus unRetweetStatus(long statusId) throws TwitterException
statusId
- The ID of the status to un-retweet.TwitterException
- when Twitter service or network is unavailableOEmbed getOEmbed(OEmbedRequest req) throws TwitterException
req
- requestTwitterException
- when Twitter service or network is unavailableResponseList<Status> lookup(long... ids) throws TwitterException
ids
- array of the ids to lookupTwitterException
- when Twitter service or network is unavailableUploadedMedia uploadMedia(File mediaFile) throws TwitterException
updateStatus(twitter4j.StatusUpdate)
mediaFile
- the latest status to be updated.TwitterException
- when Twitter service or network is unavailableUploadedMedia uploadMedia(String fileName, InputStream media) throws TwitterException
updateStatus(twitter4j.StatusUpdate)
fileName
- media file namemedia
- media body as streamTwitterException
- when Twitter service or network is unavailableUploadedMedia uploadMediaChunked(String fileName, InputStream media) throws TwitterException
updateStatus(twitter4j.StatusUpdate)
.
This should be used for videos.
fileName
- media file namemedia
- media body as streamTwitterException
- when Twitter service or network is unavailableCopyright © 2018. All rights reserved.