Module: Twitter::REST::SuggestedUsers

Includes:
Utils
Included in:
API
Defined in:
lib/twitter/rest/suggested_users.rb

Overview

Methods for accessing suggested users

Constant Summary

Constants included from Utils

Utils::DEFAULT_CURSOR

Instance Method Summary collapse

Methods included from Utils

flat_pmap, pmap

Instance Method Details

#suggest_users(slug, options = {}) ⇒ Array<Twitter::User>

Returns users in a given category with their most recent Tweet

Examples:

client.suggest_users('technology')

Parameters:

  • slug (String)

    The short name of list or a category.

  • options (Hash) (defaults to: {})

    A customizable set of options.

Returns:

See Also:



52
53
54
# File 'lib/twitter/rest/suggested_users.rb', line 52

def suggest_users(slug, options = {})
  perform_get_with_objects("/1.1/users/suggestions/#{slug}/members.json", options, User)
end

#suggestions(options = {}) ⇒ Array<Twitter::Suggestion> #suggestions(slug, options = {}) ⇒ Array<Twitter::Suggestion>

Returns suggested user categories or users in a category

Examples:

client.suggestions

Overloads:

Returns:

Raises:



32
33
34
35
36
37
38
39
# File 'lib/twitter/rest/suggested_users.rb', line 32

def suggestions(*args)
  arguments = Arguments.new(args)
  if arguments.last
    perform_get_with_object("/1.1/users/suggestions/#{arguments.pop}.json", arguments.options, Suggestion)
  else
    perform_get_with_objects("/1.1/users/suggestions.json", arguments.options, Suggestion)
  end
end