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(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_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



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

def match

end

#matchesObject



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

#telemetryObject



45
46
47
# File 'lib/rubg/client.rb', line 45

def telemetry

end