module Croudia::Rest::Statuses
Public Instance Methods
@see developer.croudia.com/docs/112_statuses_comment @return [Croudia::Object::Status] Commented status. @param params [Hash] A customized options. @option params [Integer] :id Comment status id. @option params [String] :status Comment body. @option params [Boolean] :trim_user When set to true, whisper returned will include a user object including only the status authors numerical ID. @option params [Boolean] :include_entities The entities node will be omitted when set to false.
# File lib/croudia/rest/statuses.rb, line 149 def comment(params = {}) response = post('2/statuses/comment.json', params) Croudia::Object::Status.new(response) end
@see developer.croudia.com/docs/113_statuses_comment_with_media @return [Croudia::Object::Status] Commented status. @param params [Hash] A customized options. @option params [Integer] :id Comment status id. @option params [String] :status Comment body. @option params [File] :media Attachment media. @option params [Boolean] :trim_user When set to true, whisper returned will include a user object including only the status authors numerical ID. @option params [Boolean] :include_entities The entities node will be omitted when set to false.
# File lib/croudia/rest/statuses.rb, line 164 def comment_with_media(params = {}) response = post('2/statuses/comment_with_media.json', params) Croudia::Object::Status.new(response) end
Deletes the authenticating user’s status.
@see developer.croudia.com/docs/12_statuses_destroy @return [Croudia::Object::Status] Deleted status. @param status [Croudia::Object::Status] Delete status. @param params [Hash] A customized options. @option params [Boolean] :trim_user When set to true, whisper returned will include a user object including only the status authors numerical ID. @option params [Boolean] :include_entities The entities node will be omitted when set to false.
# File lib/croudia/rest/statuses.rb, line 108 def delete_status(status, params = {}) response = post("2/statuses/destory/#{status.id}.json", params) Croudia::Object::Status.new(response) end
Returns a collection of the most recent Whispers, spreads and comments posted by the authenticating user and the users they following.
@see developer.croudia.com/docs/02_statuses_home_timeline @return [Array<Croudia::Object::Status>] Collection of the most recent statuses. @param params [Hash] A customized options. @option params [Boolean] :trim_user When set to true, each whisper returned in a timeline will include a user object including only the status authors numerical ID. @option params [Boolean] :include_entities The entities node will be omitted when set to false. @option params [Integer] :since_id Returns results with an ID greater than (that is, more recent than) the specified ID. @option params [Integer] :max_id Returns results with an ID less than (that is, older than) or equal to the specified ID. @option params [Integer] :count Specifies the number of statuses to retrieve.
# File lib/croudia/rest/statuses.rb, line 32 def home_timeline(params = {}) response = get('2/statuses/home_timeline.json', params) response.map{ |status| Croudia::Object::Status.new(status) } end
Returns the 20 most recent mentions (Whispers containing a users’s @screen_name) for the authenticating user.
@see developer.croudia.com/docs/04_statuses_mentions @return [Array<Croudia::Object::Status>] Collection of the most recent statuses. @param params [Hash] A customized options. @option params [Boolean] :trim_user When set to true, each whisper returned in a timeline will include a user object including only the status authors numerical ID. @option params [Boolean] :include_entities The entities node will be omitted when set to false. @option params [Integer] :since_id Returns results with an ID greater than (that is, more recent than) the specified ID. @option params [Integer] :max_id Returns results with an ID less than (that is, older than) or equal to the specified ID. @option params [Integer] :count Specifies the number of statuses to retrieve.
# File lib/croudia/rest/statuses.rb, line 64 def mentions_timeline(params = {}) response = get('2/statuses/mentions.json', params) response.map{ |status| Croudia::Object::Status.new(status) } end
Returns a collection of the most recent Whispers, spreads and comments posted by the authenticating user and the users they non-protected.
@see developer.croudia.com/docs/01_statuses_public_timeline @return [Array<Croudia::Object::Status>] Collection of the most recent statuses. @param params [Hash] A customized options. @option params [Boolean] :trim_user When set to true, each whisper returned in a timeline will include a user object including only the status authors numerical ID. @option params [Boolean] :include_entities The entities node will be omitted when set to false. @option params [Integer] :since_id Returns results with an ID greater than (that is, more recent than) the specified ID. @option params [Integer] :max_id Returns results with an ID less than (that is, older than) or equal to the specified ID. @option params [Integer] :count Specifies the number of statuses to retrieve.
# File lib/croudia/rest/statuses.rb, line 17 def public_timeline(params = {}) response = get('2/statuses/public_timeline.json', params) response.map{ |status| Croudia::Object::Status.new(status) } end
Shares the status by authenticating user.
@see developer.croudia.com/docs/61_statuses_spread @return [Croudia::Object::Status] Status shread by id. @param status [Croudia::Object::Status] Status. @param params [Hash] A customized options. @option params [Boolean] :trim_user When set to true, whisper returned will include a user object including only the status authors numerical ID. @option params [Boolean] :include_entities The entities node will be omitted when set to false.
# File lib/croudia/rest/statuses.rb, line 135 def spread(status, params = {}) response = post("2/statuses/spread/#{status.id}.json", params) Croudia::Object::Status.new(response) end
Returns a single Whisper, specified by the id parameter.
@see developer.croudia.com/docs/13_statuses_show @return [Croudia::Object::Status] Status specified by id. @param status [Croudia::Object::Status] Status. @param params [Hash] A customized options. @option params [Boolean] :trim_user When set to true, whisper returned will include a user object including only the status authors numerical ID. @option params [Boolean] :include_entities The entities node will be omitted when set to false.
# File lib/croudia/rest/statuses.rb, line 122 def status(status, params = {}) response = get("2/statuses/show/#{status.id}.json", params) Croudia::Object::Status.new(response) end
Updates the authenticating user’s current status.
@see developer.croudia.com/docs/11_statuses_update @return [Croudia::Object::Status] Updated status. @param params [Hash] A customized options. @option params [String] :status The text of your status update, typically up to 372 characters. @option params [Integer] :in_reply_to_status_id The ID of an existing status that the update is in reply to. @option params [Integer] :timer Whispers timer’s seconds. @option params [Boolean] :trim_user When set to true, the whisper returned will include a user object including only the status authors numerical ID. @option params [Boolean] :include_entities The entities node will be omitted when set to false.
# File lib/croudia/rest/statuses.rb, line 79 def update_status(params = {}) response = post('2/statuses/update.json', params) Croudia::Object::Status.new(response) end
Updates the authenticating user’s current status with media as photos.
@see developer.croudia.com/docs/14_statuses_update_with_media @return [Croudia::Object::Status] Updated status. @param params [Hash] A customized options. @option params [String] :status The text of your status update, typically up to 372 characters. @option params [File] :media Attachment image that PNG, JPEG or GIF format. @option params [Integer] :in_reply_to_status_id The ID of an existing status that the update is in reply to. @option params [Integer] :timer Whispers timer’s seconds. @option params [Boolean] :trim_user When set to true, the whisper returned will include a user object including only the status authors numerical ID. @option params [Boolean] :include_entities The entities node will be omitted when set to false.
# File lib/croudia/rest/statuses.rb, line 95 def update_status_with_media(params = {}) response = post('2/statuses/update_with_media.json', params) Croudia::Object::Status.new(response) end
Returns a collection of the most recent Whispers, spreads and comments posted by specified user.
@see developer.croudia.com/docs/03_statuses_user_timeline @return [Array<Croudia::Object::Status>] Collection of the most recent statuses. @param params [Hash] A customized options. @option params [String] :screen_name The screen name of the user for whom to return results for. @option params [Integer] :user_id The ID of the user for whom to return results for. @option params [Boolean] :trim_user When set to true, each whisper returned in a timeline will include a user object including only the status authors numerical ID. @option params [Boolean] :include_entities The entities node will be omitted when set to false. @option params [Integer] :since_id Returns results with an ID greater than (that is, more recent than) the specified ID. @option params [Integer] :max_id Returns results with an ID less than (that is, older than) or equal to the specified ID. @option params [Integer] :count Specifies the number of statuses to retrieve.
# File lib/croudia/rest/statuses.rb, line 49 def user_timeline(params = {}) response = get('2/statuses/user_timeline.json', params) response.map{ |status| Croudia::Object::Status.new(status) } end