Module: LinkedIn::Api::People

Included in:
Client
Defined in:
lib/linked_in/api/people.rb

Overview

People APIs

Instance Method Summary collapse

Instance Method Details

#connections(options = {}) ⇒ LinkedIn::Mash

Retrieve a list of 1st degree connections for a user who has granted access to his/her account

Permissions: r_network

Parameters:

  • options (Hash) (defaults to: {})

    identifies the user profile you want

Options Hash (options):

  • :id (String)

    a member token

  • :url (String)

    a Public Profile URL

  • :email (String)

Returns:

See Also:



34
35
36
37
# File 'lib/linked_in/api/people.rb', line 34

def connections(options={})
  path = "#{person_path(options)}/connections"
  simple_query(path, options)
end

#new_connections(modified_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)

    timestamp indicating since when you want to retrieve new connections

  • options (Hash) (defaults to: {})

    identifies the user profile you want

Options Hash (options):

  • :id (String)

    a member token

  • :url (String)

    a Public Profile URL

  • :email (String)

Returns:

See Also:



50
51
52
53
54
# File 'lib/linked_in/api/people.rb', line 50

def new_connections(modified_since, options={})
  options.merge!('modified' => 'new', 'modified-since' => modified_since)
  path = "#{person_path(options)}/connections"
  simple_query(path, options)
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')



66
67
68
69
70
# File 'lib/linked_in/api/people.rb', line 66

def picture_urls(options={})
  picture_size = options.delete(:picture_size) || 'original'
  path = "#{picture_urls_path(options)}::(#{picture_size})"
  simple_query(path, options)
end

#profile(options = {}) ⇒ LinkedIn::Mash

Retrieve a member's LinkedIn profile.

Permissions: r_basicprofile, r_fullprofile

Parameters:

  • options (Hash) (defaults to: {})

    identifies the user profile you want

Options Hash (options):

  • :id (String)

    a member token

  • :url (String)

    a Public Profile URL

  • :email (String)
  • :secure-urls (string)

    if 'true' URLs in responses will be HTTPS

Returns:

See Also:



20
21
22
23
# File 'lib/linked_in/api/people.rb', line 20

def profile(options={})
  path = person_path(options)
  simple_query(path, options)
end