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(args) ⇒ Client
constructor
A new instance of Client.
- #match ⇒ Object
- #matches ⇒ Object
- #player(args) ⇒ Object
- #players(args) ⇒ Object
- #status(args = {}) ⇒ Object
- #telemetry ⇒ Object
Constructor Details
#initialize(args) ⇒ Client
Returns a new instance of Client.
9 10 11 12 13 14 |
# File 'lib/rubg/client.rb', line 9 def initialize( args ) args = self.class.defaults.merge(args) @api_key = args[:api_key] @content_type = args[:content_type] @gzip = args[: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
40 41 42 |
# File 'lib/rubg/client.rb', line 40 def match end |
#matches ⇒ Object
35 36 37 |
# File 'lib/rubg/client.rb', line 35 def matches end |
#player(args) ⇒ Object
29 30 31 32 |
# File 'lib/rubg/client.rb', line 29 def player( args ) args = {:client => self }.merge(args) RUBG::Player.fetch( args ) end |
#players(args) ⇒ Object
23 24 25 26 |
# File 'lib/rubg/client.rb', line 23 def players( args ) args = {:client => self }.merge(args) RUBG::Players.fetch( args ) end |
#status(args = {}) ⇒ Object
17 18 19 20 |
# File 'lib/rubg/client.rb', line 17 def status( args={} ) args = {:client => self }.merge(args) RUBG::Status.fetch(args) end |
#telemetry ⇒ Object
45 46 47 |
# File 'lib/rubg/client.rb', line 45 def telemetry end |