Module: RatingChgkV2::Rest::Tournaments
- Included in:
- RatingChgkV2::Rest
- Defined in:
- lib/rating_chgk_v2/rest/tournaments.rb
Instance Method Summary collapse
- #create_tournament_result(id, params) ⇒ Object
- #delete_tournament_result(id) ⇒ Object
- #tournament(id) ⇒ Object
- #tournament_appeals(id) ⇒ Object
- #tournament_requests(id) ⇒ Object
- #tournament_results(id, params = {}) ⇒ Object
- #tournaments(params = {}) ⇒ Object
- #update_tournament_result(id, params) ⇒ Object
Instance Method Details
#create_tournament_result(id, params) ⇒ Object
26 27 28 29 |
# File 'lib/rating_chgk_v2/rest/tournaments.rb', line 26 def create_tournament_result(id, params) model_load name: 'TournamentResult', ep_name: 'Tournaments', ep_params: [[id, :results], params], method: :do_post end |
#delete_tournament_result(id) ⇒ Object
36 37 38 |
# File 'lib/rating_chgk_v2/rest/tournaments.rb', line 36 def delete_tournament_result(id) endpoint('Tournaments', [id, :results]).do_delete end |
#tournament(id) ⇒ Object
10 11 12 |
# File 'lib/rating_chgk_v2/rest/tournaments.rb', line 10 def tournament(id) model_load name: 'Tournament', ep_name: 'Tournaments', ep_params: id end |
#tournament_appeals(id) ⇒ Object
14 15 16 |
# File 'lib/rating_chgk_v2/rest/tournaments.rb', line 14 def tournament_appeals(id) collection_load name: 'TournamentAppeals', ep_name: 'Tournaments', ep_params: [[id, :appeals]] end |
#tournament_requests(id) ⇒ Object
18 19 20 |
# File 'lib/rating_chgk_v2/rest/tournaments.rb', line 18 def tournament_requests(id) collection_load name: 'TournamentRequests', ep_name: 'Tournaments', ep_params: [[id, :requests]] end |
#tournament_results(id, params = {}) ⇒ Object
22 23 24 |
# File 'lib/rating_chgk_v2/rest/tournaments.rb', line 22 def tournament_results(id, params = {}) collection_load name: 'TournamentResults', ep_name: 'Tournaments', ep_params: [[id, :results], params] end |
#tournaments(params = {}) ⇒ Object
6 7 8 |
# File 'lib/rating_chgk_v2/rest/tournaments.rb', line 6 def tournaments(params = {}) collection_load name: 'Tournaments', ep_params: [[], params] end |
#update_tournament_result(id, params) ⇒ Object
31 32 33 34 |
# File 'lib/rating_chgk_v2/rest/tournaments.rb', line 31 def update_tournament_result(id, params) model_load name: 'TournamentResult', ep_name: 'Tournaments', ep_params: [[id, :results], params], method: :do_put end |