Sha256: 884a3e5b5c0b10fa35f27facd700ea986555ba4cf764bd0e0e63566446a3a940

Contents?: true

Size: 728 Bytes

Versions: 4

Compression:

Stored size: 728 Bytes

Contents

# frozen_string_literal: true

module RatingChgkV2
  module Models
    class TeamModel < BaseModel
      def seasons(params = {})
        endpoint.reinitialize new_params: params, add_query: :seasons
        RatingChgkV2::Collections::PlayerSeasonsCollection.load :do_get, endpoint
      end

      def tournaments(params = {})
        endpoint.reinitialize new_params: params, add_query: :tournaments
        RatingChgkV2::Collections::TeamTournamentsCollection.load :do_get, endpoint
      end

      def update(params = {})
        endpoint.reinitialize new_params: params
        self.class.load :do_put, endpoint
      end

      def destroy
        endpoint.do_delete
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rating-chgk-v2-1.6.0 lib/rating_chgk_v2/models/team_model.rb
rating-chgk-v2-1.5.0 lib/rating_chgk_v2/models/team_model.rb
rating-chgk-v2-1.4.0 lib/rating_chgk_v2/models/team_model.rb
rating-chgk-v2-1.3.0 lib/rating_chgk_v2/models/team_model.rb