Class: LinkedIn::People
- Inherits:
-
APIResource
- Object
- APIResource
- LinkedIn::People
- Defined in:
- lib/linked_in/people.rb
Overview
People APIs
Instance Method Summary collapse
-
#connections(id = {}, options = {}) ⇒ Object
Retrieve a list of 1st degree connections for a user who has granted access to his/her account.
-
#new_connections(since, options = {}) ⇒ LinkedIn::Mash
Retrieve a list of the latest set of 1st degree connections for a user.
-
#picture_urls(options = {}) ⇒ Object
Retrieve the picture url http://api.linkedin.com/v1/people/~/picture-urls::(original).
-
#profile(id = {}, options = {}) ⇒ Object
Retrieve a member's LinkedIn profile.
Methods inherited from APIResource
Constructor Details
This class inherits a constructor from LinkedIn::APIResource
Instance Method Details
#connections(id = {}, options = {}) ⇒ Object
Retrieve a list of 1st degree connections for a user who has granted access to his/her account
Permissions: r_network
49 50 51 52 53 |
# File 'lib/linked_in/people.rb', line 49 def connections(id={}, ={}) = parse_id(id, ) path = "#{profile_path(, false)}/connections" get(path, ) end |
#new_connections(since, options = {}) ⇒ LinkedIn::Mash
Retrieve a list of the latest set of 1st degree connections for a user
Permissions: r_network
68 69 70 71 72 73 |
# File 'lib/linked_in/people.rb', line 68 def new_connections(since, ={}) since = parse_modified_since(since) .merge!('modified' => 'new', 'modified-since' => since) path = "#{profile_path(, false)}/connections" get(path, ) end |
#picture_urls(options = {}) ⇒ Object
Retrieve the picture url http://api.linkedin.com/v1/people/~/picture-urls::(original)
Permissions: r_network
example for use in code: client.picture_urls(:id => 'id_of_connection')
85 86 87 88 89 |
# File 'lib/linked_in/people.rb', line 85 def picture_urls(={}) picture_size = .delete(:picture_size) || 'original' path = "#{profile_path()}/picture-urls::(#{picture_size})" get(path, ) end |
#profile(id = {}, options = {}) ⇒ Object
Retrieve a member's LinkedIn profile.
Required permissions: r_basicprofile, r_fullprofile
36 37 38 39 40 |
# File 'lib/linked_in/people.rb', line 36 def profile(id={}, ={}) = parse_id(id, ) path = profile_path() get(path, ) end |