Module: AngellistApi::Client::Users
- Included in:
- AngellistApi::Client
- Defined in:
- lib/angellist_api/client/users.rb
Overview
Defines methods related to URLs
Instance Method Summary collapse
-
#get_user(id, options = {}) ⇒ Object
Get a user’s information given an id.
-
#get_users(ids) ⇒ Object
Get information for a batch of up to 50 users given a list of user IDs.
-
#me ⇒ Object
Get the current user’s information.
-
#user_roles(id, options = {}) ⇒ Object
Returns the companies that a user has been tagged in.
-
#user_search(options = {}) ⇒ Object
Search for a user given a URL slug.
Instance Method Details
#get_user(id, options = {}) ⇒ Object
Get a user’s information given an id.
15 16 17 |
# File 'lib/angellist_api/client/users.rb', line 15 def get_user(id, ={}) get("1/users/#{id}", ) end |
#get_users(ids) ⇒ Object
Get information for a batch of up to 50 users given a list of user IDs.
28 29 30 31 |
# File 'lib/angellist_api/client/users.rb', line 28 def get_users(ids) params = { :ids => ids.join(',') } get("1/users/batch", params) end |
#me ⇒ Object
Get the current user’s information. Responds like GET /users/:id.
55 56 57 |
# File 'lib/angellist_api/client/users.rb', line 55 def me get("1/me") end |
#user_roles(id, options = {}) ⇒ Object
Returns the companies that a user has been tagged in. Results are paginated.
70 71 72 |
# File 'lib/angellist_api/client/users.rb', line 70 def user_roles(id, ={}) get("1/users/#{id}/roles", ) end |
#user_search(options = {}) ⇒ Object
Search for a user given a URL slug. Responds like GET /users/:id.
45 46 47 |
# File 'lib/angellist_api/client/users.rb', line 45 def user_search(={}) get("1/users/search", ) end |