Module: Twitter::REST::SuggestedUsers

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

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>

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

Parameters:

  • slug (String)

    The short name of list or a category.

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

    A customizable set of options.

Returns:

See Also:

Rate Limited?:

  • Yes

Authentication:

  • Requires user context



43
44
45
# File 'lib/twitter/rest/suggested_users.rb', line 43

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

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

Overloads:

Returns:

Raises:

Rate Limited?:

  • Yes

Authentication:

  • Requires user context



26
27
28
29
30
31
32
33
# File 'lib/twitter/rest/suggested_users.rb', line 26

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