Sha256: 3d0b2190c6b63cb3f29a2b529abf88b0aae2b352bfef362fd16e634c908ceadd

Contents?: true

Size: 1.04 KB

Versions: 13

Compression:

Stored size: 1.04 KB

Contents

module LinkedIn
  ADDRESS_FIELDS = [ 'street1', 'street2', 'city', 'state', 'postal-code', 'country-code', 'region-code' ]
  CONTACT_INFO_FIELDS = [ 'phone1', 'phone2', 'fax' ]
  COMPANY_LOCATIONS_FIELDS = ['description', 'is-headquarters', 'is-active', { 'address' => ADDRESS_FIELDS }, { 'contact-info' => CONTACT_INFO_FIELDS } ]
  COMPANY_BASE_FIELDS = [ 'id', 'name', 'universal-name', 'email-domains', 'company-type', 'ticker', 'website-url', 
                         'industries', 'status', 'logo-url', 'square-logo-url', 'blog-rss-url', 'twitter-id', 'employee-count-range', 
                         'specialties', { 'locations' => COMPANY_LOCATIONS_FIELDS }, 'description', 'stock-exchange', 'founded-year', 
                         'end-year', 'num-followers' ]

  class Company < Base
    def self.find(id, *fields)
      find_by( { id: id }, *fields)
    end

    def self.find_by(selector, *fields)
      fields = fields.blank? ? COMPANY_BASE_FIELDS : fields
      Company.new client.company( selector: selector, fields: fields )
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
linkedin2-0.0.14 lib/linkedin/company.rb
linkedin2-0.0.13 lib/linkedin/company.rb
linkedin2-0.0.12 lib/linkedin/company.rb
linkedin2-0.0.11 lib/linkedin/company.rb
linkedin2-0.0.10 lib/linkedin/company.rb
linkedin2-0.0.9 lib/linkedin/company.rb
linkedin2-0.0.8 lib/linkedin/company.rb
linkedin2-0.0.7 lib/linkedin/company.rb
linkedin2-0.0.6 lib/linkedin/company.rb
linkedin2-0.0.5 lib/linkedin/company.rb
linkedin2-0.0.4 lib/linkedin/company.rb
linkedin2-0.0.3 lib/linkedin/company.rb
linkedin2-0.0.2 lib/linkedin/company.rb