Permalink
Browse files

Add Users#suggest_users method

  • Loading branch information...
sferik committed Sep 5, 2011
1 parent 1bb9f20 commit 15dc1812f270be0f635f65091044d7cbb88cae4d
Showing with 1,203 additions and 0 deletions.
  1. +17 −0 lib/twitter/client/user.rb
  2. +1 −0 spec/fixtures/members.json
  3. +1,165 −0 spec/fixtures/members.xml
  4. +20 −0 spec/twitter/client/user_spec.rb
View
@@ -119,6 +119,23 @@ def suggestions(*args)
format.to_s.downcase == 'xml' ? response[xml_key] : response
end
+ # Access the users in a given category of the Twitter suggested user list and return their most recent status if they are not a protected user
+ #
+ # @see https://dev.twitter.com/docs/api/1/get/users/suggestions/:slug/members
+ # @rate_limited Yes
+ # @requires_authentication No
+ # @response_format `json`
+ # @response_format `xml`
+ # @param slug [String] The short name of list or a category.
+ # @param options [Hash] A customizable set of options.
+ # @return [Array]
+ # @example Return the users in the Art & Design category and their most recent status if they are not a protected user
+ # Twitter.suggest_users("art-design")
+ def suggest_users(slug, options={})
+ response = get("1/users/suggestions/#{slug}/members", options)
+ format.to_s.downcase == 'xml' ? response['suggestions'] : response
+ end
+
# Access the profile image in various sizes for the user with the indicated screen name
#
# @see https://dev.twitter.com/docs/api/1/get/users/profile_image/:screen_name

Large diffs are not rendered by default.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 15dc181

Please sign in to comment.