Module: Twitter::REST::SuggestedUsers

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

Constant Summary

Constant Summary

Constants included from Utils

Utils::DEFAULT_CURSOR, Utils::URI_SUBSTRING

Instance Method Summary (collapse)

Methods included from Utils

flat_pmap, pmap

Instance Method Details

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

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 Also:

Rate Limited?:

  • Yes

Authentication:

  • Requires user context



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

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

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

Overloads:

Raises:

Rate Limited?:

  • Yes

Authentication:

  • Requires user context



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

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