Class: LinkedIn::API

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/linked_in/api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(access_token = nil) ⇒ API


6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/linked_in/api.rb', line 6

def initialize(access_token=nil)
  access_token = parse_access_token(access_token)
  verify_access_token!(access_token)
  @access_token = access_token

  @connection =
    LinkedIn::Connection.new params: default_params, headers: default_headers do |conn|
    conn.request :multipart
    conn.adapter Faraday.default_adapter
  end

  initialize_endpoints
end

Instance Attribute Details

#access_tokenObject

Returns the value of attribute access_token


4
5
6
# File 'lib/linked_in/api.rb', line 4

def access_token
  @access_token
end