class LinkedIn::APIResource
The abstract class all API
endpoints inherit from. Providers common builder methods across all endpoints.
@!macro profile_options
@options opts [String] :id LinkedIn ID to fetch profile for @options opts [String] :url The profile url @options opts [String] :lang Requests the language of the profile. Options are: en, fr, de, it, pt, es @options opts [Array, Hash] :fields fields to fetch. The list of fields can be found at https://developer.linkedin.com/documents/profile-fields @options opts [String] :secure (true) specify if urls in the response should be https @options opts [String] :"secure-urls" (true) alias to secure option
@!macro share_input_fields
@param [Hash] share content of the share @option share [String] :comment @option share [String] :content @option share [String] :title @option share [String] :submitted-url @option share [String] :submitted-image-url @option share [String] :description @option share [String] :visibility @option share [String] :code
@!macro organization_path_options
@param [Hash] options identifies the organization profile you want @option options [String] :email_domain organization email domain @option options [String] :id organization ID @option options [String] :urn organization URN @option options [String] :vanity_name organization vanity name
@!macro brand_path_options
@param [Hash] options identifies the brand profile you want @option options [String] :id brand ID @option options [String] :vanity_name brand vanity name @option options [String] :parent_id brand's parent organization ID.
Public Class Methods
new(connection)
click to toggle source
# File lib/linked_in/api_resource.rb, line 42 def initialize(connection) @connection = connection end
Public Instance Methods
id_to_urn(resource, id)
click to toggle source
# File lib/linked_in/api_resource.rb, line 50 def id_to_urn(resource, id) ['urn', 'li', resource, id].join(':') end
urn_to_id(urn)
click to toggle source
# File lib/linked_in/api_resource.rb, line 46 def urn_to_id(urn) urn.split(':').last end