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.



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_keyObject

Returns the value of attribute api_key.



10
11
12
# File 'lib/rubg/client.rb', line 10

def api_key
  @api_key
end

#content_typeObject

Returns the value of attribute content_type.



10
11
12
# File 'lib/rubg/client.rb', line 10

def content_type
  @content_type
end

#gzipObject (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

#matchesObject



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

#telemetryObject



49
50
51
# File 'lib/rubg/client.rb', line 49

def telemetry

end