Class: LinkedIn::Profile
- Inherits:
-
Base
- Object
- Base
- LinkedIn::Profile
show all
- Defined in:
- lib/linkedin/profile.rb
Instance Attribute Summary
Attributes inherited from Base
#attributes
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
#client, client, #initialize, #method_missing, reset_client, #respond_to?
Constructor Details
This class inherits a constructor from LinkedIn::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class LinkedIn::Base
Class Method Details
.current(*fields) ⇒ Object
7
8
9
|
# File 'lib/linkedin/profile.rb', line 7
def self.current(*fields)
find_by fields: Array[*fields]
end
|
.find(id, *fields) ⇒ Object
11
12
13
|
# File 'lib/linkedin/profile.rb', line 11
def self.find(id, *fields)
find_by id: id, fields: Array[*fields]
end
|
.find_by(options) ⇒ Object
15
16
17
|
# File 'lib/linkedin/profile.rb', line 15
def self.find_by(options)
Profile.new client.profile( { fields: LinkedIn.r_basicprofile }.merge options)
end
|
Instance Method Details
#connections ⇒ Object
3
4
5
|
# File 'lib/linkedin/profile.rb', line 3
def connections
@connections ||= client.connections(id: self.id)['values'].map { |c| Profile.new c }
end
|