パッケージ twitter4j.v1

インタフェース TweetsResources


public interface TweetsResources
  • メソッドの詳細

    • getRetweets

      ResponseList<Status> getRetweets(long statusId) throws TwitterException
      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

      IDs getRetweeterIds(long statusId, long cursor) throws TwitterException
      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

      IDs getRetweeterIds(long statusId, int count, long cursor) throws TwitterException
      Returns a collection of up to count 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

      Status showStatus(long id) throws TwitterException
      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

      Status destroyStatus(long statusId) throws TwitterException
      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

      Status updateStatus(String status) throws TwitterException
      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

      Status updateStatus(StatusUpdate latestStatus) throws TwitterException
      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

      Status retweetStatus(long statusId) throws TwitterException
      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

      Status unRetweetStatus(long statusId) throws TwitterException
      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

      OEmbed getOEmbed(OEmbedRequest req) throws TwitterException
      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

      ResponseList<Status> lookup(long... ids) throws TwitterException
      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

      UploadedMedia uploadMedia(File mediaFile) throws TwitterException
      Uploads media image to be attached via updateStatus(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

      UploadedMedia uploadMedia(String fileName, InputStream media) throws TwitterException
      Uploads media image to be attached via updateStatus(StatusUpdate)
      This method calls https://api.twitter.com/1.1/media/upload.json
      パラメータ:
      fileName - media file name
      media - media body as stream
      戻り値:
      upload result
      例外:
      TwitterException - when Twitter service or network is unavailable
      導入されたバージョン:
      Twitter4J 4.0.3
      関連項目:
    • uploadMediaChunked

      UploadedMedia uploadMediaChunked(String fileName, InputStream media) throws TwitterException
      Uploads media using chunked approach to be attached via updateStatus(StatusUpdate). This should be used for videos.
      This method calls https://api.twitter.com/1.1/media/upload.json
      パラメータ:
      fileName - media file name
      media - media body as stream
      戻り値:
      upload result
      例外:
      TwitterException - when Twitter service or network is unavailable
      導入されたバージョン:
      Twitter4J 4.0.7
      関連項目: