### Home Classes Methods

### In Files

- lib/twitter/rest/trends.rb

### Methods

- #local_trends
- #trend_locations
- #trends
- #trends_available
- #trends_closest
- #trends_place

### Included Modules

- Twitter::REST::Utils

### Class/Module Index

Quicksearch

- Twitter
- Twitter::Arguments
- Twitter::Base
- Twitter::BasicUser
- Twitter::Client
- Twitter::Configuration
- Twitter::Creatable
- Twitter::Cursor
- Twitter::DirectMessage
- Twitter::Entities
- Twitter::Entity
- Twitter::Entity::Hashtag
- Twitter::Entity::Symbol
- Twitter::Entity::URI
- Twitter::Entity::URL
- Twitter::Entity::UserMention
- Twitter::Enumerable
- Twitter::Error
- Twitter::Error::AlreadyFavorited
- Twitter::Error::AlreadyRetweeted
- Twitter::Error::BadGateway
- Twitter::Error::BadRequest
- Twitter::Error::ClientError
- Twitter::Error::Code
- Twitter::Error::ConfigurationError
- Twitter::Error::DuplicateStatus
- Twitter::Error::Forbidden
- Twitter::Error::GatewayTimeout
- Twitter::Error::InternalServerError
- Twitter::Error::NotAcceptable
- Twitter::Error::NotFound
- Twitter::Error::RequestTimeout
- Twitter::Error::ServerError
- Twitter::Error::ServiceUnavailable
- Twitter::Error::TooManyRequests
- Twitter::Error::UnacceptableIO
- Twitter::Error::Unauthorized
- Twitter::Error::UnprocessableEntity
- Twitter::Factory
- Twitter::Geo
- Twitter::Geo::Point
- Twitter::Geo::Polygon
- Twitter::GeoFactory
- Twitter::GeoResults
- Twitter::Identity
- Twitter::Language
- Twitter::List
- Twitter::Media
- Twitter::Media::Photo
- Twitter::MediaFactory
- Twitter::Metadata
- Twitter::OEmbed
- Twitter::Place
- Twitter::Profile
- Twitter::ProfileBanner
- Twitter::REST
- Twitter::REST::API
- Twitter::REST::Client
- Twitter::REST::DirectMessages
- Twitter::REST::Favorites
- Twitter::REST::FriendsAndFollowers
- Twitter::REST::Help
- Twitter::REST::Lists
- Twitter::REST::OAuth
- Twitter::REST::PlacesAndGeo
- Twitter::REST::Request
- Twitter::REST::Request::MultipartWithFile
- Twitter::REST::Response
- Twitter::REST::Response::ParseErrorJson
- Twitter::REST::Response::ParseJson
- Twitter::REST::Response::RaiseError
- Twitter::REST::SavedSearches
- Twitter::REST::Search
- Twitter::REST::SpamReporting
- Twitter::REST::SuggestedUsers
- Twitter::REST::Timelines
- Twitter::REST::Trends
- Twitter::REST::Tweets
- Twitter::REST::Undocumented
- Twitter::REST::Users
- Twitter::REST::Utils
- Twitter::RateLimit
- Twitter::Relationship
- Twitter::Request
- Twitter::SavedSearch
- Twitter::SearchResults
- Twitter::Settings
- Twitter::Size
- Twitter::SourceUser
- Twitter::Streaming
- Twitter::Streaming::Client
- Twitter::Streaming::Connection
- Twitter::Streaming::DeletedTweet
- Twitter::Streaming::Event
- Twitter::Streaming::FriendList
- Twitter::Streaming::MessageParser
- Twitter::Streaming::Response
- Twitter::Streaming::StallWarning
- Twitter::Suggestion
- Twitter::TargetUser
- Twitter::Token
- Twitter::Trend
- Twitter::TrendResults
- Twitter::Tweet
- Twitter::User
- Twitter::Utils
- Twitter::Utils::ClassMethods
- Twitter::Version

No matching classes.

# Twitter::REST::Trends

### Public Instance Methods

local_trends(id = 1, options = {}) click to toggle source
Alias for: trends
trend_locations(options = {}) click to toggle source
Alias for: trends_available
trends(id = 1, options = {}) click to toggle source

Returns the top 10 trending topics for a specific WOEID

@see dev.twitter.com/docs/api/1.1/get/trends/place @rate_limited Yes @authentication Requires user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid. @param id [Integer] The {developer.yahoo.com/geo/geoplanet Yahoo! Where On Earth ID} of the location to return trending information for. WOEIDs can be retrieved by calling {Twitter::REST::Trends#trends_available}. Global information is available by using 1 as the WOEID. @param options [Hash] A customizable set of options. @option options [String] :exclude Setting this equal to 'hashtags' will remove all hashtags from the trends list. @return [Array<Twitter::Trend>]

    # File lib/twitter/rest/trends.rb, line 21
    def trends(id = 1, options = {})
      options[:id] = id
      response = get('/1.1/trends/place.json', options).body.first
      Twitter::TrendResults.new(response)
    end

Also aliased as: local_trends, trends_place
trends_available(options = {}) click to toggle source

Returns the locations that Twitter has trending topic information for

@see dev.twitter.com/docs/api/1.1/get/trends/available @rate_limited Yes @authentication Requires user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid. @param options [Hash] A customizable set of options. @return [Array<Twitter::Place>]

    # File lib/twitter/rest/trends.rb, line 37
    def trends_available(options = {})
      perform_with_objects(:get, '/1.1/trends/available.json', options, Twitter::Place)
    end

Also aliased as: trend_locations
trends_closest(options = {}) click to toggle source

Returns the locations that Twitter has trending topic information for, closest to a specified location.

@see dev.twitter.com/docs/api/1.1/get/trends/closest @rate_limited Yes @authentication Requires user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid. @param options [Hash] A customizable set of options. @option options [Float] :lat If provided with a :long option the available trend locations will be sorted by distance, nearest to furthest, to the co-ordinate pair. The valid ranges for latitude are -90.0 to +90.0 (North is positive) inclusive. @option options [Float] :long If provided with a :lat option the available trend locations will be sorted by distance, nearest to furthest, to the co-ordinate pair. The valid ranges for longitude are -180.0 to +180.0 (East is positive) inclusive. @return [Array<Twitter::Place>]

    # File lib/twitter/rest/trends.rb, line 52
    def trends_closest(options = {})
      perform_with_objects(:get, '/1.1/trends/closest.json', options, Twitter::Place)
    end

trends_place(id = 1, options = {}) click to toggle source
Alias for: trends

[Validate]

Generated with the Darkfish Rdoc Generator 2.