Class: LinkedIn::People

Inherits:
APIResource show all
Defined in:
lib/linked_in/people.rb

Overview

People APIs

Instance Method Summary collapse

Methods inherited from APIResource

#id_to_urn, #initialize, #urn_to_id

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={}, options={})
  options = parse_id(id, options)
  path = "#{profile_path(options, false)}/connections"
  get(path, options)
end

#new_connections(since, options = {}) ⇒ LinkedIn::Mash

Retrieve a list of the latest set of 1st degree connections for a user

Permissions: r_network

Parameters:

  • modified_since (String, Fixnum, Time)

    timestamp in unix time miliseconds indicating since when you want to retrieve new connections

  • opts (Hash)

    profile options

Returns:

See Also:



68
69
70
71
72
73
# File 'lib/linked_in/people.rb', line 68

def new_connections(since, options={})
  since = parse_modified_since(since)
  options.merge!('modified' => 'new', 'modified-since' => since)
  path = "#{profile_path(options, false)}/connections"
  get(path, options)
end

#picture_urls(options = {}) ⇒ Object

Retrieve the picture url 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(options={})
  picture_size = options.delete(:picture_size) || 'original'
  path = "#{profile_path(options)}/picture-urls::(#{picture_size})"
  get(path, options)
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={}, options={})
  options = parse_id(id, options)
  path = profile_path(options)
  get(path, options)
end

#skills(id = {}, options = {}) ⇒ Object

Retrieve the skills

Permissions: r_fullprofile



94
95
96
97
98
# File 'lib/linked_in/people.rb', line 94

def skills(id={}, options={})
  options = parse_id(id, options)
  path = "#{profile_path(options, false)}/skills"
  get(path, options)
end