Class: LinkedIn::Profile

Inherits:
Base
  • Object
show all
Defined in:
lib/linked_in/profile.rb

Constant Summary collapse

PROFILE_FIELDS =

xml_reader :three_current_positions, :as => [Position]

%w[id first_name last_name headline industry
current_status current_status_timestamp summary
specialties proposal_comments associations honors
interests picture_url distance num_recommenders
public_profile_url]

Instance Method Summary collapse

Methods inherited from Base

from_xml, #initialize

Constructor Details

This class inherits a constructor from LinkedIn::Base

Instance Method Details

#api_standard_profile_requestObject



22
23
24
# File 'lib/linked_in/profile.rb', line 22

def api_standard_profile_request
  @api_standard ||= ApiStandardProfileRequest.new(@doc.xpath('./person/api-standard-profile-request'))
end

#connectionsObject



46
47
48
# File 'lib/linked_in/profile.rb', line 46

def connections
  @connections ||= Connections.new(@doc.xpath('//connections')).connections
end

#educationObject



42
43
44
# File 'lib/linked_in/profile.rb', line 42

def education
  @education ||= Education.new(@doc.xpath('//educations')).education
end

#groupsObject



50
51
52
# File 'lib/linked_in/profile.rb', line 50

def groups
  @groups ||= Group.new(@doc.xpath('//member-groups')).groups
end

#locationObject



18
19
20
# File 'lib/linked_in/profile.rb', line 18

def location
  @location ||= Location.new(@doc)
end

#member_url_resourcesObject



34
35
36
# File 'lib/linked_in/profile.rb', line 34

def member_url_resources
  @url_resources ||= UrlResource.new(@doc.xpath('//member-url-resources')).resources
end

#positionsObject



38
39
40
# File 'lib/linked_in/profile.rb', line 38

def positions
  @positions ||= Position.new(@doc.xpath('//positions')).positions
end

#relation_to_viewerObject



30
31
32
# File 'lib/linked_in/profile.rb', line 30

def relation_to_viewer
  @doc.xpath('//relation-to-viewer/distance').text
end

#site_standard_profile_requestObject



26
27
28
# File 'lib/linked_in/profile.rb', line 26

def site_standard_profile_request
  @doc.xpath('//site-standard-profile-request/url').text
end