Class: Pubg::Base
- Inherits:
-
Object
- Object
- Pubg::Base
- Defined in:
- lib/pubg/base.rb
Direct Known Subclasses
Constant Summary collapse
- BASE_URL =
'https://pubgtracker.com/api/'.freeze
Class Method Summary collapse
Class Method Details
.client ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# 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 |