Module: AngellistApi::Client::Follows
- Included in:
- AngellistApi::Client
- Defined in:
- lib/angellist_api/client/follows.rb
Overview
Defines methods related to URLs
Instance Method Summary collapse
-
#delete_follow(options = {}) ⇒ Object
Makes the authenticated user stop following the specified item.
-
#get_follows(ids) ⇒ Object
Returns the follower and followed information based on comma-separated follow ids, such as those from the activity feed.
-
#get_startup_follower_ids(id) ⇒ Object
Returns the ids of the given startup’s followers, paginated and ordered by most recent follower first.
-
#get_startup_followers(id) ⇒ Object
Returns the given startup’s followers, paginated and ordered by most recent follower first.
-
#get_user_follower_ids(id) ⇒ Object
Return the ids of the given user’s followers, paginated and ordered by most recent follower first.
-
#get_user_followers(id) ⇒ Object
Return the given user’s followers, paginated and ordered by most recent follower first.
-
#get_user_following(id, options = {}) ⇒ Object
Return objects that the given user is following, paginated and ordered by most recent follow first.
-
#get_user_following_ids(id, options = {}) ⇒ Object
Return ids of objects that the given user is following, paginated and ordered by most recent follow first.
-
#new_follow(options = {}) ⇒ Object
Makes the authenticated user follow the specified item.
Instance Method Details
#delete_follow(options = {}) ⇒ Object
Makes the authenticated user stop following the specified item. Returns the deleted follow on success, or an error on failure.
33 34 35 |
# File 'lib/angellist_api/client/follows.rb', line 33 def delete_follow(={}) delete("1/follows", ) end |
#get_follows(ids) ⇒ Object
Returns the follower and followed information based on comma-separated follow ids, such as those from the activity feed.
46 47 48 49 |
# File 'lib/angellist_api/client/follows.rb', line 46 def get_follows(ids) params = { :ids => ids.join(',') } get("1/follows/batch", params) end |
#get_startup_follower_ids(id) ⇒ Object
Returns the ids of the given startup’s followers, paginated and ordered by most recent follower first. Responds like GET /users/:id/followers.
132 133 134 |
# File 'lib/angellist_api/client/follows.rb', line 132 def get_startup_follower_ids(id) get("1/startups/#{id}/followers/ids") end |
#get_startup_followers(id) ⇒ Object
Returns the given startup’s followers, paginated and ordered by most recent follower first. Responds like GET /users/:id/followers.
119 120 121 |
# File 'lib/angellist_api/client/follows.rb', line 119 def get_startup_followers(id) get("1/startups/#{id}/followers") end |
#get_user_follower_ids(id) ⇒ Object
Return the ids of the given user’s followers, paginated and ordered by most recent follower first.
73 74 75 |
# File 'lib/angellist_api/client/follows.rb', line 73 def get_user_follower_ids(id) get("1/users/#{id}/followers/ids") end |
#get_user_followers(id) ⇒ Object
Return the given user’s followers, paginated and ordered by most recent follower first.
60 61 62 |
# File 'lib/angellist_api/client/follows.rb', line 60 def get_user_followers(id) get("1/users/#{id}/followers") end |
#get_user_following(id, options = {}) ⇒ Object
Return objects that the given user is following, paginated and ordered by most recent follow first. See the type parameter to specify which class of objects to return.
89 90 91 |
# File 'lib/angellist_api/client/follows.rb', line 89 def get_user_following(id, ={}) get("1/users/#{id}/following", ) end |
#get_user_following_ids(id, options = {}) ⇒ Object
Return ids of objects that the given user is following, paginated and ordered by most recent follow first. See the type parameter to specify which class of objects to return. Responds like GET /users/:id/followers/ids.
106 107 108 |
# File 'lib/angellist_api/client/follows.rb', line 106 def get_user_following_ids(id, ={}) get("1/users/#{id}/following/ids", ) end |
#new_follow(options = {}) ⇒ Object
Makes the authenticated user follow the specified item. Returns the new follow on success, or an error on failure.
18 19 20 |
# File 'lib/angellist_api/client/follows.rb', line 18 def new_follow(={}) post("1/follows", ) end |