lib/twitter/rest/tweets.rb
# Updates the authenticating user's status
#
# @see https://dev.twitter.com/rest/reference/post/statuses/update
# @note A status update with text identical to the authenticating user's current status will be ignored to prevent duplicates.
# @rate_limited No
# @authentication Requires user context
# @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid.
# @return [Twitter::Tweet] The created Tweet. When the tweet is deemed a duplicate by Twitter, returns the last Tweet from the user's timeline.
# @param status [String] The text of your status update, up to 140 characters.
# @param options [Hash] A customizable set of options.
# @option options [Boolean, String, Integer] :possibly_sensitive Set to true for content which may not be suitable for every audience.
# @option options [Twitter::Tweet] :in_reply_to_status An existing status that the update is in reply to. If the status being replied to was not originally posted by the authenticated user, the text of the status must begin with an @-mention, or twitter will reject the update.
# @option options [Integer] :in_reply_to_status_id The ID of an existing status that the update is in reply to.
# @option options [Float] :lat The latitude of the location this tweet refers to. This option 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 option.
# @option options [Float] :long 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 option 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 option.
# @option options [Twitter::Place] :place A place in the world. These can be retrieved from {Twitter::REST::PlacesAndGeo#reverse_geocode}.
# @option options [String] :place_id A place in the world. These IDs can be retrieved from {Twitter::REST::PlacesAndGeo#reverse_geocode}.
# @option options [String] :display_coordinates Whether or not to put a pin on the exact coordinates a tweet has been sent from.
# @option options [Boolean, String, Integer] :trim_user Each tweet returned in a timeline will include a user object with only the author's numerical ID when set to true, 't' or 1.
Updates the authenticating user's status
Updates the authenticating user ' s status
def update(status, options = {})
        update!(status, options)
      rescue Twitter::Error::DuplicateStatus
        user_timeline(count: 1).first
      end
def update ( status , options = { } ) update! ( status , options ) rescue Twitter :: Error :: DuplicateStatus user_timeline ( count : 1 ) . first end
Updates the authenticating user's status
Updates the authenticating user ' s status
The created Tweet. When the tweet is deemed a duplicate by Twitter, returns the last Tweet from the user's timeline.
The created Tweet . When the tweet is deemed a duplicate by Twitter returns the last Tweet from the user ' s timeline .
Twitter::Tweet
[Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid.
[ Twitter :: Error :: Unauthorized ] Error raised when supplied user credentials are not valid .
status
The text of your status update, up to 140 characters.
The text of your status update up to 140 characters .
options
:trim_user Each tweet returned in a timeline will include a user object with only the author's numerical ID when set to true, 't' or 1.
: trim_user Each tweet returned in a timeline will include a user object with only the author ' s numerical ID when set to true ' t ' or 1 .
see
None
note
A status update with text identical to the authenticating user's current status will be ignored to prevent duplicates.
A status update with text identical to the authenticating user ' s current status will be ignored to prevent duplicates .
rate_limited
None
authentication
Requires user context
Requires user context