Class: FtcEventsClient::LeaguesApi
- Inherits:
-
Object
- Object
- FtcEventsClient::LeaguesApi
- Defined in:
- lib/ftc_events_client/api/leagues_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ LeaguesApi
constructor
A new instance of LeaguesApi.
-
#v20_season_leagues_get(season, opts = {}) ⇒ SeasonLeagueListingsModelVersion2
League Listings The league listings API returns all FTC leagues in a particular season.
-
#v20_season_leagues_get_with_http_info(season, opts = {}) ⇒ Array<(SeasonLeagueListingsModelVersion2, Integer, Hash)>
League Listings The league listings API returns all FTC leagues in a particular season.
-
#v20_season_leagues_members_region_code_league_code_get(season, region_code, league_code, opts = {}) ⇒ LeagueMemberListModel
League Membership The league membership API returns the list of team numbers for the teams that are members of a particular league.
-
#v20_season_leagues_members_region_code_league_code_get_with_http_info(season, region_code, league_code, opts = {}) ⇒ Array<(LeagueMemberListModel, Integer, Hash)>
League Membership The league membership API returns the list of team numbers for the teams that are members of a particular league.
-
#v20_season_leagues_rankings_region_code_league_code_get(season, region_code, league_code, opts = {}) ⇒ EventRankingsModel
League Rankings The league rankings API returns team ranking detail from a particular league in a particular season.
-
#v20_season_leagues_rankings_region_code_league_code_get_with_http_info(season, region_code, league_code, opts = {}) ⇒ Array<(EventRankingsModel, Integer, Hash)>
League Rankings The league rankings API returns team ranking detail from a particular league in a particular season.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ LeaguesApi
Returns a new instance of LeaguesApi.
16 17 18 |
# File 'lib/ftc_events_client/api/leagues_api.rb', line 16 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
14 15 16 |
# File 'lib/ftc_events_client/api/leagues_api.rb', line 14 def api_client @api_client end |
Instance Method Details
#v20_season_leagues_get(season, opts = {}) ⇒ SeasonLeagueListingsModelVersion2
League Listings The league listings API returns all FTC leagues in a particular season. You can specify a ‘regionCode` to filter to leagues within a particular region. To filter to a specific league, supply both a `regionCode` and a `leagueCode`. The returned objects have a `parentLeagueCode` field, which indicates the league is a child league if not null and provides the code of the parent league. The `regionCode` of the parent league will always match the child.
26 27 28 29 |
# File 'lib/ftc_events_client/api/leagues_api.rb', line 26 def v20_season_leagues_get(season, opts = {}) data, _status_code, _headers = v20_season_leagues_get_with_http_info(season, opts) data end |
#v20_season_leagues_get_with_http_info(season, opts = {}) ⇒ Array<(SeasonLeagueListingsModelVersion2, Integer, Hash)>
League Listings The league listings API returns all FTC leagues in a particular season. You can specify a `regionCode` to filter to leagues within a particular region. To filter to a specific league, supply both a `regionCode` and a `leagueCode`. The returned objects have a `parentLeagueCode` field, which indicates the league is a child league if not null and provides the code of the parent league. The `regionCode` of the parent league will always match the child.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/ftc_events_client/api/leagues_api.rb', line 38 def v20_season_leagues_get_with_http_info(season, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LeaguesApi.v20_season_leagues_get ...' end # verify the required parameter 'season' is set if @api_client.config.client_side_validation && season.nil? fail ArgumentError, "Missing the required parameter 'season' when calling LeaguesApi.v20_season_leagues_get" end # resource path local_var_path = '/v2.0/{season}/leagues'.sub('{' + 'season' + '}', season.to_s) # query parameters query_params = opts[:query_params] || {} query_params[:'regionCode'] = opts[:'region_code'] if !opts[:'region_code'].nil? query_params[:'leagueCode'] = opts[:'league_code'] if !opts[:'league_code'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'SeasonLeagueListingsModelVersion2' auth_names = opts[:auth_names] || ['basic'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: LeaguesApi#v20_season_leagues_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#v20_season_leagues_members_region_code_league_code_get(season, region_code, league_code, opts = {}) ⇒ LeagueMemberListModel
League Membership The league membership API returns the list of team numbers for the teams that are members of a particular league. Leagues are specified by a ‘regionCode` in combination with a `leagueCode`.
88 89 90 91 |
# File 'lib/ftc_events_client/api/leagues_api.rb', line 88 def v20_season_leagues_members_region_code_league_code_get(season, region_code, league_code, opts = {}) data, _status_code, _headers = v20_season_leagues_members_region_code_league_code_get_with_http_info(season, region_code, league_code, opts) data end |
#v20_season_leagues_members_region_code_league_code_get_with_http_info(season, region_code, league_code, opts = {}) ⇒ Array<(LeagueMemberListModel, Integer, Hash)>
League Membership The league membership API returns the list of team numbers for the teams that are members of a particular league. Leagues are specified by a `regionCode` in combination with a `leagueCode`.
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/ftc_events_client/api/leagues_api.rb', line 100 def v20_season_leagues_members_region_code_league_code_get_with_http_info(season, region_code, league_code, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LeaguesApi.v20_season_leagues_members_region_code_league_code_get ...' end # verify the required parameter 'season' is set if @api_client.config.client_side_validation && season.nil? fail ArgumentError, "Missing the required parameter 'season' when calling LeaguesApi.v20_season_leagues_members_region_code_league_code_get" end # verify the required parameter 'region_code' is set if @api_client.config.client_side_validation && region_code.nil? fail ArgumentError, "Missing the required parameter 'region_code' when calling LeaguesApi.v20_season_leagues_members_region_code_league_code_get" end # verify the required parameter 'league_code' is set if @api_client.config.client_side_validation && league_code.nil? fail ArgumentError, "Missing the required parameter 'league_code' when calling LeaguesApi.v20_season_leagues_members_region_code_league_code_get" end # resource path local_var_path = '/v2.0/{season}/leagues/members/{regionCode}/{leagueCode}'.sub('{' + 'season' + '}', season.to_s).sub('{' + 'regionCode' + '}', region_code.to_s).sub('{' + 'leagueCode' + '}', league_code.to_s) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'LeagueMemberListModel' auth_names = opts[:auth_names] || ['basic'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: LeaguesApi#v20_season_leagues_members_region_code_league_code_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#v20_season_leagues_rankings_region_code_league_code_get(season, region_code, league_code, opts = {}) ⇒ EventRankingsModel
League Rankings The league rankings API returns team ranking detail from a particular league in a particular season. League rankings are only the cumulative rankings from League Meets - they do not include performance at the League Tournament. To get League Tournament Rankings, use the Event Rankings endpoint.
156 157 158 159 |
# File 'lib/ftc_events_client/api/leagues_api.rb', line 156 def v20_season_leagues_rankings_region_code_league_code_get(season, region_code, league_code, opts = {}) data, _status_code, _headers = v20_season_leagues_rankings_region_code_league_code_get_with_http_info(season, region_code, league_code, opts) data end |
#v20_season_leagues_rankings_region_code_league_code_get_with_http_info(season, region_code, league_code, opts = {}) ⇒ Array<(EventRankingsModel, Integer, Hash)>
League Rankings The league rankings API returns team ranking detail from a particular league in a particular season. League rankings are only the cumulative rankings from League Meets - they do not include performance at the League Tournament. To get League Tournament Rankings, use the Event Rankings endpoint.
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 |
# File 'lib/ftc_events_client/api/leagues_api.rb', line 168 def v20_season_leagues_rankings_region_code_league_code_get_with_http_info(season, region_code, league_code, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LeaguesApi.v20_season_leagues_rankings_region_code_league_code_get ...' end # verify the required parameter 'season' is set if @api_client.config.client_side_validation && season.nil? fail ArgumentError, "Missing the required parameter 'season' when calling LeaguesApi.v20_season_leagues_rankings_region_code_league_code_get" end # verify the required parameter 'region_code' is set if @api_client.config.client_side_validation && region_code.nil? fail ArgumentError, "Missing the required parameter 'region_code' when calling LeaguesApi.v20_season_leagues_rankings_region_code_league_code_get" end # verify the required parameter 'league_code' is set if @api_client.config.client_side_validation && league_code.nil? fail ArgumentError, "Missing the required parameter 'league_code' when calling LeaguesApi.v20_season_leagues_rankings_region_code_league_code_get" end # resource path local_var_path = '/v2.0/{season}/leagues/rankings/{regionCode}/{leagueCode}'.sub('{' + 'season' + '}', season.to_s).sub('{' + 'regionCode' + '}', region_code.to_s).sub('{' + 'leagueCode' + '}', league_code.to_s) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'EventRankingsModel' auth_names = opts[:auth_names] || ['basic'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: LeaguesApi#v20_season_leagues_rankings_region_code_league_code_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |