Class: RUBG::Client

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/rubg/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_keyObject

Returns the value of attribute api_key.



7
8
9
# File 'lib/rubg/client.rb', line 7

def api_key
  @api_key
end

#content_typeObject

Returns the value of attribute content_type.



7
8
9
# File 'lib/rubg/client.rb', line 7

def content_type
  @content_type
end

#gzipObject

Returns the value of attribute gzip.



7
8
9
# File 'lib/rubg/client.rb', line 7

def gzip
  @gzip
end

Instance Method Details

#matchObject



36
37
38
# File 'lib/rubg/client.rb', line 36

def match

end

#matchesObject



31
32
33
# File 'lib/rubg/client.rb', line 31

def matches

end

#playerObject



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,query_options={})
  RUBG::Players.fetch(self, shard, query_options)
end

#statusObject



16
17
18
# File 'lib/rubg/client.rb', line 16

def status
  RUBG::Status.fetch(self)
end

#telemetryObject



41
42
43
# File 'lib/rubg/client.rb', line 41

def telemetry

end