module LinkedinV2::Api::Organizations

Constants

ORGANIZATION_ENTITY

Public Instance Methods

add_company_post(**options) click to toggle source
# File lib/linkedin_v2/api/organizations.rb, line 32
def add_company_post(**options)
  attrs = options.merge(entity: ORGANIZATION_ENTITY)
  body = LinkedinV2::Templates::Payloads::UgcPost.new(attrs)
  path = LinkedinV2::Url::Builder.(:ugc_post)

  request(:post, path, body.to_json, post_headers)
end
add_company_share(**options) click to toggle source
# File lib/linkedin_v2/api/organizations.rb, line 24
def add_company_share(**options)
  attrs = options.merge(entity: ORGANIZATION_ENTITY)
  body = LinkedinV2::Templates::Payloads::Shares.new(attrs)
  path = LinkedinV2::Url::Builder.(:shares)

  request(:post, path, body.to_json, post_headers)
end
company_brand(identifier:, projection: nil) click to toggle source

Retrieve Organization Logos and Cover Photos docs.microsoft.com/en-us/linkedin/marketing/integrations/community-management/organizations/organization-lookup-api#retrieve-organization-logos–cover-photos

# File lib/linkedin_v2/api/organizations.rb, line 17
def company_brand(identifier:, projection: nil)
  params = { identifier: identifier, projection: projection }
  path = LinkedinV2::Url::Builder.(:company, params)

  request(:get, path)
end
organizations(projection: nil, start: nil, count: nil) click to toggle source

Retrieve information about organizations docs.microsoft.com/en-us/linkedin/marketing/integrations/community-management/organizations/organization-access-control

# File lib/linkedin_v2/api/organizations.rb, line 8
def organizations(projection: nil, start: nil, count: nil)
  params = { projection: projection, start: start, count: count }
  path = LinkedinV2::Url::Builder.(:organizations, params)

  request(:get, path)
end