Class: Dotinha::Client
- Inherits:
-
Object
- Object
- Dotinha::Client
- Defined in:
- lib/dotinha.rb
Instance Method Summary collapse
- #get_match_details(match_id, params = {}) ⇒ Object
- #get_match_history(params = {}) ⇒ Object
-
#initialize(api_key) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(api_key) ⇒ Client
Returns a new instance of Client.
27 28 29 |
# File 'lib/dotinha.rb', line 27 def initialize(api_key) @api_key = api_key end |
Instance Method Details
#get_match_details(match_id, params = {}) ⇒ Object
36 37 38 39 40 |
# File 'lib/dotinha.rb', line 36 def get_match_details(match_id, params={}) params[:key] ||= @api_key params[:match_id] ||= match_id MatchDetails.get_data(params) end |
#get_match_history(params = {}) ⇒ Object
31 32 33 34 |
# File 'lib/dotinha.rb', line 31 def get_match_history(params={}) params[:key] ||= @api_key MatchHistory.get_data(params) end |