module LinkedinV2::Api::Profiles

Constants

PROFILE_ENTITY

Public Instance Methods

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

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

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

Retrieve information about profile docs.microsoft.com/en-us/linkedin/shared/integrations/people/profile-api

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

  request(:get, path)
end