Module: Twitter::API::Timelines

### Home Classes Methods

### In Files

- lib/twitter/api/timelines.rb

### Methods

- #home_timeline
- #mentions
- #mentions_timeline
- #retweeted_by
- #retweeted_by_me
- #retweeted_by_user
- #retweeted_to_me
- #retweets_of_me
- #user_timeline

### Included Modules

- Twitter::API::Utils

### Class/Module Index

Quicksearch

- Twitter
- Twitter::API
- Twitter::API::Arguments
- Twitter::API::DirectMessages
- Twitter::API::Favorites
- Twitter::API::FriendsAndFollowers
- Twitter::API::Help
- Twitter::API::Lists
- Twitter::API::PlacesAndGeo
- Twitter::API::SavedSearches
- Twitter::API::Search
- Twitter::API::SpamReporting
- Twitter::API::SuggestedUsers
- Twitter::API::Timelines
- Twitter::API::Trends
- Twitter::API::Tweets
- Twitter::API::Undocumented
- Twitter::API::Users
- Twitter::API::Utils
- Twitter::Action
- Twitter::Action::Favorite
- Twitter::Action::Follow
- Twitter::Action::ListMemberAdded
- Twitter::Action::Mention
- Twitter::Action::Reply
- Twitter::Action::Retweet
- Twitter::Action::Status
- Twitter::Action::Tweet
- Twitter::ActionFactory
- Twitter::Base
- Twitter::BasicUser
- Twitter::Client
- Twitter::Configurable
- Twitter::Configuration
- Twitter::Creatable
- Twitter::Cursor
- Twitter::Default
- Twitter::DirectMessage
- Twitter::Entity
- Twitter::Entity::Hashtag
- Twitter::Entity::Url
- Twitter::Entity::UserMention
- Twitter::Error
- Twitter::Error::AlreadyFavorited
- Twitter::Error::AlreadyRetweeted
- Twitter::Error::BadGateway
- Twitter::Error::BadRequest
- Twitter::Error::ClientError
- Twitter::Error::ConfigurationError
- Twitter::Error::DecodeError
- Twitter::Error::EnhanceYourCalm
- Twitter::Error::Forbidden
- Twitter::Error::GatewayTimeout
- Twitter::Error::IdentityMapKeyError
- Twitter::Error::InternalServerError
- Twitter::Error::NotAcceptable
- Twitter::Error::NotFound
- Twitter::Error::RateLimited
- Twitter::Error::ServerError
- Twitter::Error::ServiceUnavailable
- Twitter::Error::TooManyRequests
- Twitter::Error::Unauthorized
- Twitter::Error::UnprocessableEntity
- Twitter::Exceptable
- Twitter::Factory
- Twitter::Geo
- Twitter::Geo::Point
- Twitter::Geo::Polygon
- Twitter::GeoFactory
- Twitter::Identity
- Twitter::IdentityMap
- Twitter::Language
- Twitter::List
- Twitter::Media
- Twitter::Media::Photo
- Twitter::MediaFactory
- Twitter::Metadata
- Twitter::OEmbed
- Twitter::Place
- Twitter::ProfileBanner
- Twitter::RateLimit
- Twitter::Relationship
- Twitter::Request
- Twitter::Request::MultipartWithFile
- Twitter::Response
- Twitter::Response::ParseJson
- Twitter::Response::RaiseError
- Twitter::SavedSearch
- Twitter::SearchResults
- Twitter::Settings
- Twitter::Size
- Twitter::SourceUser
- Twitter::Status
- Twitter::Suggestion
- Twitter::TargetUser
- Twitter::Trend
- Twitter::Tweet
- Twitter::User
- Twitter::Version
- Enumerable
- Kernel

No matching classes.

# Twitter::API::Timelines

### Constants

DEFAULT_TWEETS_PER_REQUEST
MAX_TWEETS_PER_REQUEST

### Public Instance Methods

home_timeline(options={}) click to toggle source

Returns the 20 most recent Tweets, including retweets if they exist, posted by the authenticating user and the users they follow

@see dev.twitter.com/docs/api/1.1/get/statuses/home_timeline @note This method can only return up to 800 Tweets, including retweets. @rate_limited Yes @authentication Requires user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid. @return [Array<Twitter::Tweet>] @param options [Hash] A customizable set of options. @option options [Integer] :since_id Returns results with an ID greater than (that is, more recent than) the specified ID. @option options [Integer] :max_id Returns results with an ID less than (that is, older than) or equal to the specified ID. @option options [Integer] :count Specifies the number of records to retrieve. Must be less than or equal to 200. @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. @option options [Boolean, String, Integer] :exclude_replies This parameter will prevent replies from appearing in the returned timeline. Using exclude_replies with the count parameter will mean you will receive up-to count tweets - this is because the count parameter retrieves that many tweets before filtering out retweets and replies. @option options [Boolean, String, Integer] :include_rts Specifies that the timeline should include native retweets in addition to regular tweets. Note: If you're using the trim_user parameter in conjunction with include_rts, the retweets will no longer contain a full user object. @option options [Boolean, String, Integer] :contributor_details Specifies that the contributors element should be enhanced to include the screen_name of the contributor. @option options [Boolean, String, Integer] :include_entities The tweet entities node will be disincluded when set to false. @example Return the 20 most recent Tweets, including retweets if they exist, posted by the authenticating user and the users they follow

    Twitter.home_timeline

    # File lib/twitter/api/timelines.rb, line 123
    def home_timeline(options={})
      objects_from_response(Twitter::Tweet, :get, "/1.1/statuses/home_timeline.json", options)
    end

mentions(options={}) click to toggle source
Alias for: mentions_timeline
mentions_timeline(options={}) click to toggle source

Returns the 20 most recent mentions (statuses containing @username) for the authenticating user

@see dev.twitter.com/docs/api/1.1/get/statuses/mentions_timeline @note This method can only return up to 800 Tweets. @rate_limited Yes @authentication Requires user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid. @return [Array<Twitter::Tweet>] @param options [Hash] A customizable set of options. @option options [Integer] :since_id Returns results with an ID greater than (that is, more recent than) the specified ID. @option options [Integer] :max_id Returns results with an ID less than (that is, older than) or equal to the specified ID. @option options [Integer] :count Specifies the number of records to retrieve. Must be less than or equal to 200. @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. @example Return the 20 most recent mentions (statuses containing @username) for the authenticating user

    Twitter.mentions

    # File lib/twitter/api/timelines.rb, line 27
    def mentions_timeline(options={})
      objects_from_response(Twitter::Tweet, :get, "/1.1/statuses/mentions_timeline.json", options)
    end

Also aliased as: mentions
retweeted_by(user, options={}) click to toggle source
Alias for: retweeted_by_user
retweeted_by_me(options={}) click to toggle source

Returns the 20 most recent retweets posted by the authenticating user

@see dev.twitter.com/docs/api/1.1/get/statuses/user_timeline @note This method can only return up to 3,200 Tweets. @rate_limited Yes @authentication Requires user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid. @return [Array<Twitter::Tweet>] @param options [Hash] A customizable set of options. @option options [Integer] :since_id Returns results with an ID greater than (that is, more recent than) the specified ID. @option options [Integer] :max_id Returns results with an ID less than (that is, older than) or equal to the specified ID. @option options [Integer] :count Specifies the number of records to retrieve. Must be less than or equal to 200. @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. @option options [Boolean, String, Integer] :exclude_replies This parameter will prevent replies from appearing in the returned timeline. Using exclude_replies with the count parameter will mean you will receive up-to count tweets - this is because the count parameter retrieves that many tweets before filtering out retweets and replies. @option options [Boolean, String, Integer] :contributor_details Specifies that the contributors element should be enhanced to include the screen_name of the contributor. @example Return the 20 most recent retweets posted by the authenticating user

    Twitter.retweeted_by_me

    # File lib/twitter/api/timelines.rb, line 98
    def retweeted_by_me(options={})
      retweets_from_timeline(options) do |opts|
        user_timeline(opts)
      end
    end

retweeted_by_user(user, options={}) click to toggle source

Returns the 20 most recent retweets posted by the specified user

@see dev.twitter.com/docs/api/1.1/get/statuses/user_timeline @note This method can only return up to 3,200 Tweets. @rate_limited Yes @authentication Requires user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid. @return [Array<Twitter::Tweet>] @param user [Integer, String, Twitter::User] A Twitter user ID, screen name, or object. @param options [Hash] A customizable set of options. @option options [Integer] :since_id Returns results with an ID greater than (that is, more recent than) the specified ID. @option options [Integer] :max_id Returns results with an ID less than (that is, older than) or equal to the specified ID. @option options [Integer] :count Specifies the number of records to retrieve. Must be less than or equal to 200. @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. @option options [Boolean, String, Integer] :exclude_replies This parameter will prevent replies from appearing in the returned timeline. Using exclude_replies with the count parameter will mean you will receive up-to count tweets - this is because the count parameter retrieves that many tweets before filtering out retweets and replies. @option options [Boolean, String, Integer] :contributor_details Specifies that the contributors element should be enhanced to include the screen_name of the contributor. @example Return the 20 most recent retweets posted by @sferik

    Twitter.retweeted_by_user('sferik')

    # File lib/twitter/api/timelines.rb, line 74
    def retweeted_by_user(user, options={})
      retweets_from_timeline(options) do |opts|
        user_timeline(user, opts)
      end
    end

Also aliased as: retweeted_by
retweeted_to_me(options={}) click to toggle source

Returns the 20 most recent retweets posted by users the authenticating user follow.

@see dev.twitter.com/docs/api/1.1/get/statuses/home_timeline @note This method can only return up to 800 Tweets, including retweets. @rate_limited Yes @authentication Requires user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid. @return [Array<Twitter::Tweet>] @param options [Hash] A customizable set of options. @option options [Integer] :since_id Returns results with an ID greater than (that is, more recent than) the specified ID. @option options [Integer] :max_id Returns results with an ID less than (that is, older than) or equal to the specified ID. @option options [Integer] :count Specifies the number of records to retrieve. Must be less than or equal to 200. @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. @option options [Boolean, String, Integer] :exclude_replies This parameter will prevent replies from appearing in the returned timeline. Using exclude_replies with the count parameter will mean you will receive up-to count tweets - this is because the count parameter retrieves that many tweets before filtering out retweets and replies. @option options [Boolean, String, Integer] :contributor_details Specifies that the contributors element should be enhanced to include the screen_name of the contributor. @option options [Boolean, String, Integer] :include_entities The tweet entities node will be disincluded when set to false. @example Return the 20 most recent retweets posted by users followed by the authenticating user

    Twitter.retweeted_to_me

    # File lib/twitter/api/timelines.rb, line 145
    def retweeted_to_me(options={})
      retweets_from_timeline(options) do |opts|
        home_timeline(opts)
      end
    end

retweets_of_me(options={}) click to toggle source

Returns the 20 most recent tweets of the authenticated user that have been retweeted by others

@see dev.twitter.com/docs/api/1.1/get/statuses/retweets_of_me @rate_limited Yes @authentication Requires user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid. @return [Array<Twitter::Tweet>] @param options [Hash] A customizable set of options. @option options [Integer] :count Specifies the number of records to retrieve. Must be less than or equal to 200. @option options [Integer] :since_id Returns results with an ID greater than (that is, more recent than) the specified ID. @option options [Integer] :max_id Returns results with an ID less than (that is, older than) or equal to the specified ID. @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. @option options [Boolean, String, Integer] :include_entities The tweet entities node will be disincluded when set to false. @option options [Boolean, String, Integer] :include_user_entities The user entities node will be disincluded when set to false. @example Return the 20 most recent tweets of the authenticated user that have been retweeted by others

    Twitter.retweets_of_me

    # File lib/twitter/api/timelines.rb, line 167
    def retweets_of_me(options={})
      objects_from_response(Twitter::Tweet, :get, "/1.1/statuses/retweets_of_me.json", options)
    end

user_timeline(*args) click to toggle source

Returns the 20 most recent Tweets posted by the specified user

@see dev.twitter.com/docs/api/1.1/get/statuses/user_timeline @note This method can only return up to 3,200 Tweets. @rate_limited Yes @authentication Requires user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid. @return [Array<Twitter::Tweet>] @overload user_timeline(user, options={})

    @param user [Integer, String, Twitter::User] A Twitter user ID, screen name, or object.
    @param options [Hash] A customizable set of options.
    @option options [Integer] :since_id Returns results with an ID greater than (that is, more recent than) the specified ID.
    @option options [Integer] :max_id Returns results with an ID less than (that is, older than) or equal to the specified ID.
    @option options [Integer] :count Specifies the number of records to retrieve. Must be less than or equal to 200.
    @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.
    @option options [Boolean, String, Integer] :exclude_replies This parameter will prevent replies from appearing in the returned timeline. Using exclude_replies with the count parameter will mean you will receive up-to count tweets - this is because the count parameter retrieves that many tweets before filtering out retweets and replies.
    @option options [Boolean, String, Integer] :contributor_details Specifies that the contributors element should be enhanced to include the screen_name of the contributor.
    @option options [Boolean, String, Integer] :include_rts Specifies that the timeline should include native retweets in addition to regular tweets. Note: If you're using the trim_user parameter in conjunction with include_rts, the retweets will no longer contain a full user object.
    @example Return the 20 most recent Tweets posted by @sferik
      Twitter.user_timeline('sferik')

    # File lib/twitter/api/timelines.rb, line 52
    def user_timeline(*args)
      objects_from_response_with_user(Twitter::Tweet, :get, "/1.1/statuses/user_timeline.json", args)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.