Module: Twitter::API::SuggestedUsers

### Home Classes Methods

### In Files

- lib/twitter/api/suggested_users.rb

### Methods

- #suggest_users
- #suggestions

### 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::SuggestedUsers

### Public Instance Methods

suggest_users(slug, options={}) click to toggle source

Access the users in a given category of the Twitter suggested user list and return their most recent Tweet if they are not a protected user

@see dev.twitter.com/docs/api/1.1/get/users/suggestions/:slug/members @rate_limited Yes @authentication Requires user context @param slug [String] The short name of list or a category. @param options [Hash] A customizable set of options. @return [Array<Twitter::User>] @example Return the users in the Art & Design category and their most recent Tweet if they are not a protected user

    Twitter.suggest_users("art-design")

    # File lib/twitter/api/suggested_users.rb, line 49
    def suggest_users(slug, options={})
      objects_from_response(Twitter::User, :get, "/1.1/users/suggestions/#{slug}/members.json", options)
    end

suggestions(*args) click to toggle source

@return [Array<Twitter::Suggestion>] @rate_limited Yes @authentication Requires user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid. @overload suggestions(options={})

    Returns the list of suggested user categories

    @see https://dev.twitter.com/docs/api/1.1/get/users/suggestions
    @param options [Hash] A customizable set of options.
    @example Return the list of suggested user categories
      Twitter.suggestions

@overload suggestions(slug, options={})

    Returns the users in a given category

    @see https://dev.twitter.com/docs/api/1.1/get/users/suggestions/:slug
    @param slug [String] The short name of list or a category.
    @param options [Hash] A customizable set of options.
    @example Return the users in the Art & Design category
      Twitter.suggestions("art-design")

    # File lib/twitter/api/suggested_users.rb, line 30
    def suggestions(*args)
      arguments = Twitter::API::Arguments.new(args)
      if slug = arguments.pop
        object_from_response(Twitter::Suggestion, :get, "/1.1/users/suggestions/#{slug}.json", arguments.options)
      else
        objects_from_response(Twitter::Suggestion, :get, "/1.1/users/suggestions.json", arguments.options)
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.