Class: Openfooty::Client
- Inherits:
-
Object
- Object
- Openfooty::Client
- Includes:
- HTTParty
- Defined in:
- lib/openfooty/client.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
Instance Method Summary collapse
- #auth(method, options = {}) ⇒ Object
- #betting(method, options = {}) ⇒ Object
- #channel(method, options = {}) ⇒ Object
- #community(method, options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ Client
constructor
Other API methods here: www.footytube.com/openfooty/karma.php.
- #league(method, options = {}) ⇒ Object
- #match(method, options = {}) ⇒ Object
- #player(method, options = {}) ⇒ Object
- #team(method, options = {}) ⇒ Object
- #video(method, options = {}) ⇒ Object
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(={}) @api_key = [:api_key] || Openfooty.api_key end |
Instance Attribute Details
#api_key ⇒ Object (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, ={}) mashup(self.class.get("/auth.#{method}", :query => .merge(self.))) end |
#betting(method, options = {}) ⇒ Object
25 26 27 |
# File 'lib/openfooty/client.rb', line 25 def betting(method, ={}) mashup(self.class.get("/betting.#{method}", :query => .merge(self.))) end |
#channel(method, options = {}) ⇒ Object
29 30 31 |
# File 'lib/openfooty/client.rb', line 29 def channel(method, ={}) mashup(self.class.get("/channel.#{method}", :query => .merge(self.))) end |
#community(method, options = {}) ⇒ Object
33 34 35 |
# File 'lib/openfooty/client.rb', line 33 def community(method, ={}) mashup(self.class.get("/community.#{method}", :query => .merge(self.))) end |
#league(method, options = {}) ⇒ Object
37 38 39 |
# File 'lib/openfooty/client.rb', line 37 def league(method, ={}) mashup(self.class.get("/league.#{method}", :query => .merge(self.))) end |
#match(method, options = {}) ⇒ Object
41 42 43 |
# File 'lib/openfooty/client.rb', line 41 def match(method, ={}) mashup(self.class.get("/match.#{method}", :query => .merge(self.))) end |
#player(method, options = {}) ⇒ Object
45 46 47 |
# File 'lib/openfooty/client.rb', line 45 def player(method, ={}) mashup(self.class.get("/player.#{method}", :query => .merge(self.))) end |
#team(method, options = {}) ⇒ Object
49 50 51 |
# File 'lib/openfooty/client.rb', line 49 def team(method, ={}) mashup(self.class.get("/team.#{method}", :query => .merge(self.))) end |
#video(method, options = {}) ⇒ Object
53 54 55 |
# File 'lib/openfooty/client.rb', line 53 def video(method, ={}) mashup(self.class.get("/video.#{method}", :query => .merge(self.))) end |