Class: RatingChgkV2::Models::TeamModel
- Defined in:
- lib/rating_chgk_v2/models/team_model.rb
Instance Attribute Summary
Attributes inherited from BaseModel
Instance Method Summary collapse
- #destroy ⇒ Object
- #seasons(params = {}) ⇒ Object
- #tournaments(params = {}) ⇒ Object
- #update(params = {}) ⇒ Object
Methods inherited from BaseModel
Constructor Details
This class inherits a constructor from RatingChgkV2::Models::BaseModel
Instance Method Details
#destroy ⇒ Object
21 22 23 |
# File 'lib/rating_chgk_v2/models/team_model.rb', line 21 def destroy endpoint.do_delete end |
#seasons(params = {}) ⇒ Object
6 7 8 9 |
# File 'lib/rating_chgk_v2/models/team_model.rb', line 6 def seasons(params = {}) endpoint.reinitialize new_params: params, add_query: :seasons RatingChgkV2::Collections::PlayerSeasonsCollection.load :do_get, endpoint end |
#tournaments(params = {}) ⇒ Object
11 12 13 14 |
# File 'lib/rating_chgk_v2/models/team_model.rb', line 11 def tournaments(params = {}) endpoint.reinitialize new_params: params, add_query: :tournaments RatingChgkV2::Collections::TeamTournamentsCollection.load :do_get, endpoint end |
#update(params = {}) ⇒ Object
16 17 18 19 |
# File 'lib/rating_chgk_v2/models/team_model.rb', line 16 def update(params = {}) endpoint.reinitialize new_params: params self.class.load :do_put, endpoint end |