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
readonly
Returns the value of attribute gzip.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Client
constructor
A new instance of Client.
- #match(args) ⇒ 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.
12 13 14 15 16 17 |
# File 'lib/rubg/client.rb', line 12 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.
10 11 12 |
# File 'lib/rubg/client.rb', line 10 def api_key @api_key end |
#content_type ⇒ Object
Returns the value of attribute content_type.
10 11 12 |
# File 'lib/rubg/client.rb', line 10 def content_type @content_type end |
#gzip ⇒ Object (readonly)
Returns the value of attribute gzip.
9 10 11 |
# File 'lib/rubg/client.rb', line 9 def gzip @gzip end |
Instance Method Details
#match(args) ⇒ Object
43 44 45 46 |
# File 'lib/rubg/client.rb', line 43 def match ( args ) args = {:client => self }.merge(args) RUBG::Match.fetch( args ) end |
#matches ⇒ Object
38 39 40 |
# File 'lib/rubg/client.rb', line 38 def matches end |
#player(args) ⇒ Object
32 33 34 35 |
# File 'lib/rubg/client.rb', line 32 def player( args ) args = {:client => self }.merge(args) RUBG::Player.fetch( args ) end |
#players(args) ⇒ Object
26 27 28 29 |
# File 'lib/rubg/client.rb', line 26 def players( args ) args = {:client => self }.merge(args) RUBG::PlayerCollection.fetch( args ) end |
#status(args = {}) ⇒ Object
20 21 22 23 |
# File 'lib/rubg/client.rb', line 20 def status( args={} ) args = {:client => self }.merge(args) RUBG::Status.fetch(args) end |
#telemetry ⇒ Object
49 50 51 |
# File 'lib/rubg/client.rb', line 49 def telemetry end |