パッケージ twitter4j.v1
インタフェース TweetsResources
public interface TweetsResources
-
メソッドの概要
修飾子とタイプメソッド説明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.getOEmbed
(OEmbedRequest req) Returns information allowing the creation of an embedded representation of a Tweet on third party sites.getRetweeterIds
(long statusId, int count, long cursor) Returns a collection of up tocount
user IDs belonging to users who have retweeted the tweet specified by the id parameter.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.getRetweets
(long statusId) Returns up to 100 of the first retweets of a given tweet.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.retweetStatus
(long statusId) Retweets a tweet.showStatus
(long id) Returns a single status, specified by the id parameter below.unRetweetStatus
(long statusId) Untweets a retweeted status.updateStatus
(String status) Updates the authenticating user's status.updateStatus
(StatusUpdate latestStatus) Updates the authenticating user's status.uploadMedia
(File mediaFile) Uploads media image to be attached viaupdateStatus(StatusUpdate)
This method calls https://api.twitter.com/1.1/media/upload.jsonuploadMedia
(String fileName, InputStream media) Uploads media image to be attached viaupdateStatus(StatusUpdate)
This method calls https://api.twitter.com/1.1/media/upload.jsonuploadMediaChunked
(String fileName, InputStream media) Uploads media using chunked approach to be attached viaupdateStatus(StatusUpdate)
.
-
メソッドの詳細
-
getRetweets
Returns up to 100 of the first retweets of a given tweet.
This method calls https://api.twitter.com/1.1/statuses/retweets- パラメータ:
statusId
- The numerical ID of the tweet you want the retweets of.- 戻り値:
- the retweets of a given tweet
- 例外:
TwitterException
- when Twitter service or network is unavailable- 導入されたバージョン:
- Twitter4J 2.0.10
- 関連項目:
-
getRetweeterIds
Returns a collection of up to 100 user IDs belonging to users who have retweeted the tweet specified by the id parameter.
This method calls https://api.twitter.com/1.1/get/statuses/retweeters/ids- パラメータ:
statusId
- The numerical ID of the tweet you want the retweeters of.cursor
- The cursor of the page to fetch. Use -1 to start.- 戻り値:
- the retweets of a given tweet
- 例外:
TwitterException
- when Twitter service or network is unavailable- 導入されたバージョン:
- Twitter4J 3.0.5
- 関連項目:
-
getRetweeterIds
Returns a collection of up tocount
user IDs belonging to users who have retweeted the tweet specified by the id parameter.
This method calls https://api.twitter.com/1.1/get/statuses/retweeters/ids- パラメータ:
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.- 戻り値:
- the retweets of a given tweet
- 例外:
TwitterException
- when Twitter service or network is unavailable- 導入されたバージョン:
- Twitter4J 3.0.5
- 関連項目:
-
showStatus
Returns a single status, specified by the id parameter below. The status's author will be returned inline.
This method calls https://api.twitter.com/1.1/statuses/show- パラメータ:
id
- the numerical ID of the status you're trying to retrieve- 戻り値:
- a single status
- 例外:
TwitterException
- when Twitter service or network is unavailable- 導入されたバージョン:
- Twitter4J 2.0.1
- 関連項目:
-
destroyStatus
Destroys the status specified by the required ID parameter.
Usage note: The authenticating user must be the author of the specified status.
This method calls https://api.twitter.com/1.1/statuses/destroy- パラメータ:
statusId
- The ID of the status to destroy.- 戻り値:
- the deleted status
- 例外:
TwitterException
- when Twitter service or network is unavailable- 導入されたバージョン:
- 1.0.5
- 関連項目:
-
updateStatus
Updates the authenticating user's status. A status update with text identical to the authenticating user's current status will be ignored to prevent duplicates.
This method calls https://api.twitter.com/1.1/statuses/update- パラメータ:
status
- the text of your status update- 戻り値:
- the latest status
- 例外:
TwitterException
- when Twitter service or network is unavailable- 導入されたバージョン:
- Twitter4J 2.0.1
- 関連項目:
-
updateStatus
Updates the authenticating user's status. A status update with text identical to the authenticating user's current status will be ignored to prevent duplicates.
This method calls https://api.twitter.com/1.1/statuses/update or
This method calls https://upload.twitter.com/1/statuses/update_with_media- パラメータ:
latestStatus
- the latest status to be updated.- 戻り値:
- the latest status
- 例外:
TwitterException
- when Twitter service or network is unavailable- 導入されたバージョン:
- Twitter4J 2.1.1
- 関連項目:
-
retweetStatus
Retweets a tweet. Returns the original tweet with retweet details embedded.
This method calls https://api.twitter.com/1.1/statuses/retweet- パラメータ:
statusId
- The ID of the status to retweet.- 戻り値:
- the retweeted status
- 例外:
TwitterException
- when Twitter service or network is unavailable- 導入されたバージョン:
- Twitter4J 2.0.10
- 関連項目:
-
unRetweetStatus
Untweets a retweeted status. Returns the original Tweet with retweet details embedded.
This method calls https://api.twitter.com/1.1/statuses/unretweet- パラメータ:
statusId
- The ID of the status to un-retweet.- 戻り値:
- the original Tweet with retweet details embedded
- 例外:
TwitterException
- when Twitter service or network is unavailable- 導入されたバージョン:
- Twitter4J 4.0.7
- 関連項目:
-
getOEmbed
Returns information allowing the creation of an embedded representation of a Tweet on third party sites. See the oEmbed specification for information about the response format. While this endpoint allows a bit of customization for the final appearance of the embedded Tweet, be aware that the appearance of the rendered Tweet may change over time to be consistent with Twitter's Display Requirements. Do not rely on any class or id parameters to stay constant in the returned markup.
This method calls https://api.twitter.com/1.1/statuses/oembed.json- パラメータ:
req
- request- 戻り値:
- information allowing the creation of an embedded representation of a Tweet on third party sites
- 例外:
TwitterException
- when Twitter service or network is unavailable- 導入されたバージョン:
- Twitter4J 3.0.2
- 関連項目:
-
lookup
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.
This method calls https://api.twitter.com/1.1/statuses/lookup.json- パラメータ:
ids
- array of the ids to lookup- 戻り値:
- list of the tweets
- 例外:
TwitterException
- when Twitter service or network is unavailable- 導入されたバージョン:
- Twitter4J 4.0.2
- 関連項目:
-
uploadMedia
Uploads media image to be attached viaupdateStatus(StatusUpdate)
This method calls https://api.twitter.com/1.1/media/upload.json- パラメータ:
mediaFile
- the latest status to be updated.- 戻り値:
- upload result
- 例外:
TwitterException
- when Twitter service or network is unavailable- 導入されたバージョン:
- Twitter4J 4.0.2
- 関連項目:
-
uploadMedia
Uploads media image to be attached viaupdateStatus(StatusUpdate)
This method calls https://api.twitter.com/1.1/media/upload.json- パラメータ:
fileName
- media file namemedia
- media body as stream- 戻り値:
- upload result
- 例外:
TwitterException
- when Twitter service or network is unavailable- 導入されたバージョン:
- Twitter4J 4.0.3
- 関連項目:
-
uploadMediaChunked
Uploads media using chunked approach to be attached viaupdateStatus(StatusUpdate)
. This should be used for videos.
This method calls https://api.twitter.com/1.1/media/upload.json- パラメータ:
fileName
- media file namemedia
- media body as stream- 戻り値:
- upload result
- 例外:
TwitterException
- when Twitter service or network is unavailable- 導入されたバージョン:
- Twitter4J 4.0.7
- 関連項目:
-