class Pubg::Base

Constants

BASE_URL

Public Class Methods

client() click to toggle source
# File lib/pubg/base.rb, line 6
def client
  @client ||= Faraday.new(
    url: BASE_URL,
    headers: {
      'TRN-Api-Key' => Pubg.config.tracker_id
    }
  ) do |connection|
    connection.use Pubg::ParseJsonMiddleware, content_type: /\bjson$/
    connection.adapter :net_http
  end
end