module LinkedIn::Api::Companies
Companies
API
@see developer.linkedin.com/docs/company-pages Companies
API @see developer.linkedin.com/docs/fields/companies Company Fields
The following API actions do not have corresponding methods in this module
* Permissions Checking Endpoints for Company Shares * GET Suggested Companies to Follow * GET Company Products
[(contribute here)](github.com/hexgnu/linkedin)
Public Instance Methods
Retrieve a Company Profile
@see developer.linkedin.com/docs/fields/company-profile Company Profile field @see developer.linkedin.com/docs/company-pages#company_profile Company Profile
@macro company_path_options @option options [String] :scope @option options [String] :type @option options [String] :count @option options [String] :start @return [LinkedIn::Mash]
# File lib/linked_in/api/companies.rb, line 30 def company(options = {}) path = company_path(options) simple_query(path, options) end
Retrieve statistics for a particular company page
Permissions: rw_company_admin
@see developer.linkedin.com/docs/company-pages#statistics Get Company Statistics
@macro company_path_options @return [LinkedIn::Mash]
# File lib/linked_in/api/companies.rb, line 57 def company_statistics(options={}) path = "#{company_path(options)}/company-statistics" simple_query(path, options) end
Retrieve a feed of event items for a Company
@see developer.linkedin.com/docs/company-pages#get_update Get Specific Company Update
@macro company_path_options @option options [String] :event-type @option options [String] :count @option options [String] :start @return [LinkedIn::Mash]
# File lib/linked_in/api/companies.rb, line 44 def company_updates(options={}) path = "#{company_path(options)}/updates" simple_query(path, options) end
Retrieve comments on a particular company update:
@see developer.linkedin.com/docs/company-pages#get_update_comments Get comments for a specific Company update
@param [String] update_key a update/update-key representing a
particular company update
@macro company_path_options @return [LinkedIn::Mash]
# File lib/linked_in/api/companies.rb, line 70 def company_updates_comments(update_key, options={}) path = "#{company_path(options)}/updates/key=#{update_key}/update-comments" simple_query(path, options) end
Retrieve likes on a particular company update:
@see developer.linkedin.com/docs/company-pages#get_update_likes Get likes for a specific Company update
@param [String] update_key a update/update-key representing a
particular company update
@macro company_path_options @return [LinkedIn::Mash]
# File lib/linked_in/api/companies.rb, line 83 def company_updates_likes(update_key, options={}) path = "#{company_path(options)}/updates/key=#{update_key}/likes" simple_query(path, options) end
(Create) authenticated user starts following a company
@see developer.linkedin.com/documents/company-follow-and-suggestions
@param [String] company_id Company ID @return [void]
# File lib/linked_in/api/companies.rb, line 111 def follow_company(company_id) path = "/people/~/following/companies" body = { id: company_id } post(path, MultiJson.dump(body), "Content-Type" => "application/json") end
(Destroy) authenticated user stops following a company
@see developer.linkedin.com/documents/company-follow-and-suggestions
@param [String] company_id Company ID @return [void]
# File lib/linked_in/api/companies.rb, line 123 def unfollow_company(company_id) path = "/people/~/following/companies/id=#{company_id}" delete(path) end