Class: RUBG::Client
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#gzip ⇒ Object
Returns the value of attribute gzip.
Instance Method Summary collapse
-
#initialize(api_key = ENV['PUBG_API_KEY'], gzip = false) ⇒ Client
constructor
A new instance of Client.
- #match ⇒ Object
- #matches ⇒ Object
- #player ⇒ Object
- #players(shard = $RUBG_DEFAULT_SHARD, query_options = {}) ⇒ Object
- #status ⇒ Object
- #telemetry ⇒ Object
Constructor Details
#initialize(api_key = ENV['PUBG_API_KEY'], gzip = false) ⇒ Client
Returns a new instance of Client.
9 10 11 12 13 |
# File 'lib/rubg/client.rb', line 9 def initialize(api_key=ENV['PUBG_API_KEY'],gzip=false) @api_key = api_key @content_type = "application/vnd.api+json" @gzip = gzip end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
7 8 9 |
# File 'lib/rubg/client.rb', line 7 def api_key @api_key end |
#content_type ⇒ Object
Returns the value of attribute content_type.
7 8 9 |
# File 'lib/rubg/client.rb', line 7 def content_type @content_type end |
#gzip ⇒ Object
Returns the value of attribute gzip.
7 8 9 |
# File 'lib/rubg/client.rb', line 7 def gzip @gzip end |
Instance Method Details
#match ⇒ Object
36 37 38 |
# File 'lib/rubg/client.rb', line 36 def match end |
#matches ⇒ Object
31 32 33 |
# File 'lib/rubg/client.rb', line 31 def matches end |
#player ⇒ Object
26 27 28 |
# File 'lib/rubg/client.rb', line 26 def player end |
#players(shard = $RUBG_DEFAULT_SHARD, query_options = {}) ⇒ Object
21 22 23 |
# File 'lib/rubg/client.rb', line 21 def players(shard=$RUBG_DEFAULT_SHARD,={}) RUBG::Players.fetch(self, shard, ) end |
#status ⇒ Object
16 17 18 |
# File 'lib/rubg/client.rb', line 16 def status RUBG::Status.fetch(self) end |
#telemetry ⇒ Object
41 42 43 |
# File 'lib/rubg/client.rb', line 41 def telemetry end |