Class: LinkedIn::Organizations

Inherits:
APIResource show all
Defined in:
lib/linked_in/organizations.rb

Overview

Organizations API

[(contribute here)](github.com/mdesjardins/linkedin-v2)

Instance Method Summary collapse

Methods inherited from APIResource

#id_to_urn, #initialize, #urn_to_id

Constructor Details

This class inherits a constructor from LinkedIn::APIResource

Instance Method Details

#brand(options = {}) ⇒ LinkedIn::Mash

Retrieve an Organization Brand

Parameters:

  • options (Hash) (defaults to: {})

    identifies the brand profile you want

Options Hash (options):

  • :id (String)

    brand ID

  • :vanity_name (String)

    brand vanity name

  • :parent_id (String)

    brand's parent organization ID.

  • :scope (String)
  • :type (String)
  • :count (String)
  • :start (String)

Returns:

See Also:


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

def brand(options = {})
  path = brand_path(options)
  get(path, options)
end

#organization(options = {}) ⇒ LinkedIn::Mash

Retrieve an Organization

Parameters:

  • options (Hash) (defaults to: {})

    identifies the organization profile you want

Options Hash (options):

  • :email_domain (String)

    organization email domain

  • :id (String)

    organization ID

  • :urn (String)

    organization URN

  • :vanity_name (String)

    organization vanity name

  • :scope (String)
  • :type (String)
  • :count (String)
  • :start (String)

Returns:

See Also:


18
19
20
21
# File 'lib/linked_in/organizations.rb', line 18

def organization(options = {})
  path = organization_path(options)
  get(path, options)
end

#organization_acls(options = {}) ⇒ Object

Retrieve Organization Access Control informaion


42
43
44
45
# File 'lib/linked_in/organizations.rb', line 42

def organization_acls(options = {})
  path = '/organizationAcls'
  get(path, options)
end

#organization_follower_count(organization_urn) ⇒ Object


120
121
122
123
# File 'lib/linked_in/organizations.rb', line 120

def organization_follower_count organization_urn
  path = "/networkSizes/#{organization_urn}?edgeType=CompanyFollowedByMember"
  get(path)
end

#organization_follower_statistics(options = {}) ⇒ LinkedIn::Mash

Retrieve statistics for a particular organization followers

Permissions: rw_organization

Parameters:

  • urn (Hash)

    a customizable set of options

Returns:

See Also:


98
99
100
101
# File 'lib/linked_in/organizations.rb', line 98

def organization_follower_statistics(options = {})
  path = "/organizationalEntityFollowerStatistics?q=organizationalEntity&organizationalEntity=#{options.delete(:urn)}"
  get(path, options)
end

#organization_page_statistics(options = {}) ⇒ LinkedIn::Mash

Retrieve statistics for a particular organization page

Permissions: rw_organization

Parameters:

  • urn (Hash)

    a customizable set of options

Returns:

See Also:


85
86
87
88
# File 'lib/linked_in/organizations.rb', line 85

def organization_page_statistics(options = {})
  path = "/organizationPageStatistics?q=organization&organization=#{options.delete(:urn)}"
  get(path, options)
end

#organization_search(options = {}) ⇒ LinkedIn::Mash

Perform a keyword-based Organization search sorted by relevance

Parameters:

  • options (Hash) (defaults to: {})

    identifies the organization profile you want

Options Hash (options):

  • :email_domain (String)

    organization email domain

  • :id (String)

    organization ID

  • :urn (String)

    organization URN

  • :vanity_name (String)

    organization vanity name

  • :scope (String)
  • :type (String)
  • :count (String)
  • :start (String)

Returns:

See Also:


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

def organization_search(options = {})
  path = "/search?q=companiesV2&baseSearchParams.keywords=#{CGI.escape(options[:keyword])}&projection=(metadata,elements*(entity~),paging)"
  get(path, options)
end

#organization_share_statistics(options = {}) ⇒ LinkedIn::Mash

Retrieve statistics for a particular organization shares

Permissions: rw_organization

Parameters:

  • urn (Hash)

    a customizable set of options

Returns:

See Also:


111
112
113
114
# File 'lib/linked_in/organizations.rb', line 111

def organization_share_statistics(options = {})
  path = "/organizationalEntityShareStatistics?q=organizationalEntity&organizationalEntity=#{options.delete(:urn)}"
  get(path, options)
end