Class: PUBG::Client

Inherits:
Object
  • Object
show all
Includes:
Match, Player, Seasons, Status, Telemetry, Configurable, Connection
Defined in:
lib/pubg/client.rb,
lib/pubg/client/match.rb,
lib/pubg/client/player.rb,
lib/pubg/client/status.rb,
lib/pubg/client/seasons.rb,
lib/pubg/client/telemetry.rb

Overview

Client for PUBG API

Defined Under Namespace

Modules: Match, Player, Seasons, Status, Telemetry

Instance Attribute Summary

Attributes included from Configurable

#access_token, #api_endpoint, #connection_options, #region

Instance Method Summary collapse

Methods included from Telemetry

#telemetry

Methods included from Status

#status

Methods included from Seasons

#seasons

Methods included from Player

#player, #players

Methods included from Match

#match

Methods included from Connection

#agent, #get

Methods included from Configurable

#configure, keys, #reset!

Constructor Details

#initialize(options = {}) ⇒ Client

Returns a new instance of Client.



21
22
23
24
25
# File 'lib/pubg/client.rb', line 21

def initialize(options = {})
  PUBG::Configurable.keys.each do |key|
    instance_variable_set(:"@#{key}", options[key] || PUBG.instance_variable_get(:"@#{key}"))
  end
end