Class: Openfooty::Client

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Client

Other API methods here: www.footytube.com/openfooty/karma.php



17
18
19
# File 'lib/openfooty/client.rb', line 17

def initialize(options={})
  @api_key = options[:api_key] || Openfooty.api_key
end

Instance Attribute Details

#api_keyObject (readonly)

Returns the value of attribute api_key.



8
9
10
# File 'lib/openfooty/client.rb', line 8

def api_key
  @api_key
end

Instance Method Details

#auth(method, options = {}) ⇒ Object



21
22
23
# File 'lib/openfooty/client.rb', line 21

def auth(method, options={})
  mashup(self.class.get("/auth.#{method}", :query => options.merge(self.default_options)))
end

#betting(method, options = {}) ⇒ Object



25
26
27
# File 'lib/openfooty/client.rb', line 25

def betting(method, options={})
  mashup(self.class.get("/betting.#{method}", :query => options.merge(self.default_options)))
end

#channel(method, options = {}) ⇒ Object



29
30
31
# File 'lib/openfooty/client.rb', line 29

def channel(method, options={})
  mashup(self.class.get("/channel.#{method}", :query => options.merge(self.default_options)))
end

#community(method, options = {}) ⇒ Object



33
34
35
# File 'lib/openfooty/client.rb', line 33

def community(method, options={})
  mashup(self.class.get("/community.#{method}", :query => options.merge(self.default_options)))
end

#league(method, options = {}) ⇒ Object



37
38
39
# File 'lib/openfooty/client.rb', line 37

def league(method, options={})
  mashup(self.class.get("/league.#{method}", :query => options.merge(self.default_options)))
end

#match(method, options = {}) ⇒ Object



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

def match(method, options={})
  mashup(self.class.get("/match.#{method}", :query => options.merge(self.default_options)))
end

#player(method, options = {}) ⇒ Object



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

def player(method, options={})
  mashup(self.class.get("/player.#{method}", :query => options.merge(self.default_options)))
end

#team(method, options = {}) ⇒ Object



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

def team(method, options={})
  mashup(self.class.get("/team.#{method}", :query => options.merge(self.default_options)))
end

#video(method, options = {}) ⇒ Object



53
54
55
# File 'lib/openfooty/client.rb', line 53

def video(method, options={})
  mashup(self.class.get("/video.#{method}", :query => options.merge(self.default_options)))
end