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 Attribute Summary

Attributes inherited from Base

#doc

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



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

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

#birthdateObject



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

def birthdate
  @birthday ||= Birthdate.new(@doc.xpath('./person/date-of-birth'))
end

#connectionsObject



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

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

#current_shareObject



61
62
63
# File 'lib/linked_in/profile.rb', line 61

def current_share
  @current_share ||= CurrentShare.new(@doc.xpath('//current-share'))
end

#educationsObject



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

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

#groupsObject



53
54
55
# File 'lib/linked_in/profile.rb', line 53

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

#languagesObject



65
66
67
# File 'lib/linked_in/profile.rb', line 65

def languages
  @languages ||= Languages.new(@doc.xpath('//languages')).languages
end

#locationObject



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

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

#member_url_resourcesObject



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

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

#patentsObject



81
82
83
# File 'lib/linked_in/profile.rb', line 81

def patents
  @patents ||= Patents.new(@doc.xpath('//patents')).patents
end

#phone_numbersObject



73
74
75
# File 'lib/linked_in/profile.rb', line 73

def phone_numbers
  @phone_number ||= PhoneNumber.new(@doc.xpath('//phone-numbers')).phone_numbers
end

#positionsObject



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

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

#publicationsObject



77
78
79
# File 'lib/linked_in/profile.rb', line 77

def publications
  @publications ||= Publications.new(@doc.xpath('//publications')).publications
end

#recommendationsObject



57
58
59
# File 'lib/linked_in/profile.rb', line 57

def recommendations
  @recommendations ||= Recommendations.new(@doc.xpath('//recommendations-received')).recommendations
end

#relation_to_viewerObject



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

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

#site_standard_profile_requestObject



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

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

#skillsObject



69
70
71
# File 'lib/linked_in/profile.rb', line 69

def skills
  @skills ||= Skill.new(@doc.xpath('//skills')).skills
end