lib/twitter/rest/tweets.rb in twitter-5.9.0 vs lib/twitter/rest/tweets.rb in twitter-5.10.0

- old
+ new

@@ -71,11 +71,10 @@ # @param tweets [Enumerable<Integer, String, URI, Twitter::Tweet>] A collection of Tweet IDs, URIs, or objects. # @overload statuses(*tweets, options) # @param tweets [Enumerable<Integer, String, URI, Twitter::Tweet>] A collection of Tweet IDs, URIs, or objects. # @param options [Hash] A customizable set of options. # @option options [Symbol, String] :method Requests users via a GET request instead of the standard POST request if set to ':get'. - # @option options [Boolean] :include_entities The tweet entities node will be disincluded when set to false. # @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. def statuses(*args) arguments = Twitter::Arguments.new(args) request_method = arguments.options.delete(:method) || :post flat_pmap(arguments.each_slice(MAX_TWEETS_PER_REQUEST)) do |tweets| @@ -115,16 +114,18 @@ # @authentication Requires user context # @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid. # @return [Twitter::Tweet] The created Tweet. # @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. # @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] :media_ids A comma separated list of uploaded media IDs to attach to the Tweet. # @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. def update(status, options = {}) update!(status, options) rescue Twitter::Error::DuplicateStatus @@ -140,15 +141,17 @@ # @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid. # @raise [Twitter::Error::DuplicateStatus] Error raised when a duplicate status is posted. # @return [Twitter::Tweet] The created Tweet. # @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. # @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] :media_ids A comma separated list of uploaded media IDs to attach to the Tweet. # @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. def update!(status, options = {}) hash = options.dup hash[:in_reply_to_status_id] = hash.delete(:in_reply_to_status).id unless hash[:in_reply_to_status].nil?