lib/linkedin/profile.rb in linkedin2-0.0.3 vs lib/linkedin/profile.rb in linkedin2-0.0.4
- old
+ new
@@ -1,20 +1,19 @@
module LinkedIn
class Profile < Base
def connections
- @connections ||= client.connections(selector: { id: self.id })['values'].map { |c| Profile.new c }
+ @connections ||= client.connections(id: self.id)['values'].map { |c| Profile.new c }
end
def self.current(*fields)
- find_by( { }, *fields)
+ find_by fields: Array[*fields]
end
def self.find(id, *fields)
- find_by( { id: id }, *fields)
+ find_by id: id, fields: Array[*fields]
end
- def self.find_by(selector, *fields)
- fields = fields.blank? ? LinkedIn.r_basicprofile : fields
- Profile.new client.profile( selector: selector, fields: fields )
+ def self.find_by(options)
+ Profile.new client.profile( { fields: LinkedIn.r_basicprofile }.merge options)
end
end
end