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, options = {}) ⇒ Object
Returns the ids of the given startup’s followers, paginated and ordered by most recent follower first.
-
#get_startup_followers(id, options = {}) ⇒ Object
Returns the given startup’s followers, paginated and ordered by most recent follower first.
-
#get_user_follower_ids(id, options = {}) ⇒ Object
Return the ids of the given user’s followers, paginated and ordered by most recent follower first.
-
#get_user_followers(id, options = {}) ⇒ 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.
47 48 49 50 |
# File 'lib/angellist_api/client/follows.rb', line 47 def get_follows(ids) params = { :ids => ids.join(',') } get("1/follows/batch", params) end |
#get_startup_follower_ids(id, options = {}) ⇒ Object
Returns the ids of the given startup’s followers, paginated and ordered by most recent follower first. Responds like GET /users/:id/followers.
143 144 145 |
# File 'lib/angellist_api/client/follows.rb', line 143 def get_startup_follower_ids(id, ={}) get("1/startups/#{id}/followers/ids", ) end |
#get_startup_followers(id, options = {}) ⇒ Object
Returns the given startup’s followers, paginated and ordered by most recent follower first. Responds like GET /users/:id/followers.
128 129 130 |
# File 'lib/angellist_api/client/follows.rb', line 128 def get_startup_followers(id, ={}) get("1/startups/#{id}/followers", ) end |
#get_user_follower_ids(id, options = {}) ⇒ Object
Return the ids of the given user’s followers, paginated and ordered by most recent follower first.
78 79 80 |
# File 'lib/angellist_api/client/follows.rb', line 78 def get_user_follower_ids(id, ={}) get("1/users/#{id}/followers/ids", ) end |
#get_user_followers(id, options = {}) ⇒ Object
Return the given user’s followers, paginated and ordered by most recent follower first.
63 64 65 |
# File 'lib/angellist_api/client/follows.rb', line 63 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.
95 96 97 |
# File 'lib/angellist_api/client/follows.rb', line 95 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.
113 114 115 |
# File 'lib/angellist_api/client/follows.rb', line 113 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 |