Module: PUBG::Connection

Included in:
Client
Defined in:
lib/pubg/connection.rb

Overview

Network layer

Instance Method Summary collapse

Instance Method Details

#agentObject



8
9
10
11
12
13
# File 'lib/pubg/connection.rb', line 8

def agent
  @agent || Sawyer::Agent.new(api_endpoint, sawyer_options) do |http|
    http.headers[:accept] = @connection_options[:headers][:accept]
    http.authorization 'Bearer', @access_token
  end
end

#get(url, options = {}) ⇒ Object



4
5
6
# File 'lib/pubg/connection.rb', line 4

def get(url, options = {})
  request :get, url, options
end