Class: RatingChgkV2::Models::TournamentModel
- Inherits:
-
BaseModel
- Object
- BaseModel
- RatingChgkV2::Models::TournamentModel
show all
- Defined in:
- lib/rating_chgk_v2/models/tournament_model.rb
Instance Attribute Summary
Attributes inherited from BaseModel
#endpoint
Instance Method Summary
collapse
Methods inherited from BaseModel
inherited, #initialize, load
Instance Method Details
#appeals ⇒ Object
6
7
8
9
|
# File 'lib/rating_chgk_v2/models/tournament_model.rb', line 6
def appeals
endpoint.reinitialize add_query: :appeals
RatingChgkV2::Collections::TournamentAppealsCollection.load :do_get, endpoint
end
|
#create_result(params = {}) ⇒ Object
21
22
23
24
|
# File 'lib/rating_chgk_v2/models/tournament_model.rb', line 21
def create_result(params = {})
endpoint.reinitialize new_params: params, add_query: :results
RatingChgkV2::Models::TournamentResultModel.load :do_post, endpoint
end
|
#requests ⇒ Object
11
12
13
14
|
# File 'lib/rating_chgk_v2/models/tournament_model.rb', line 11
def requests
endpoint.reinitialize add_query: :requests
RatingChgkV2::Collections::TournamentRequestsCollection.load :do_get, endpoint
end
|
#results(params = {}) ⇒ Object
16
17
18
19
|
# File 'lib/rating_chgk_v2/models/tournament_model.rb', line 16
def results(params = {})
endpoint.reinitialize new_params: params, add_query: :results
RatingChgkV2::Collections::TournamentResultsCollection.load :do_get, endpoint
end
|