Sha256: 558fa687794525ddf19c86ceb8b4d04cfb0cf8bac521a530001eb05e30a03394

Contents?: true

Size: 453 Bytes

Versions: 16

Compression:

Stored size: 453 Bytes

Contents

module LinkedIn
  class Profile < Base
    def connections
      @connections ||= client.connections(id: self.id)['values'].map { |c| Profile.new c }
    end

    def self.current(*fields)
      find_by fields: Array[*fields]
    end

    def self.find(id, *fields)
      find_by id: id, fields: Array[*fields]
    end

    def self.find_by(options)
      Profile.new client.profile( { fields: LinkedIn.r_basicprofile }.merge options)
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
linkedin2-0.0.19 lib/linkedin/profile.rb
linkedin2-0.0.18 lib/linkedin/profile.rb
linkedin2-0.0.17 lib/linkedin/profile.rb
linkedin2-0.0.16 lib/linkedin/profile.rb
linkedin2-0.0.15 lib/linkedin/profile.rb
linkedin2-0.0.14 lib/linkedin/profile.rb
linkedin2-0.0.13 lib/linkedin/profile.rb
linkedin2-0.0.12 lib/linkedin/profile.rb
linkedin2-0.0.11 lib/linkedin/profile.rb
linkedin2-0.0.10 lib/linkedin/profile.rb
linkedin2-0.0.9 lib/linkedin/profile.rb
linkedin2-0.0.8 lib/linkedin/profile.rb
linkedin2-0.0.7 lib/linkedin/profile.rb
linkedin2-0.0.6 lib/linkedin/profile.rb
linkedin2-0.0.5 lib/linkedin/profile.rb
linkedin2-0.0.4 lib/linkedin/profile.rb