Class: FtcEventsClient::SeasonDataApi
- Inherits:
-
Object
- Object
- FtcEventsClient::SeasonDataApi
- Defined in:
- lib/ftc_events_client/api/season_data_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) ⇒ SeasonDataApi
constructor
A new instance of SeasonDataApi.
-
#v20_season_events_get(season, opts = {}) ⇒ SeasonEventListingsModelVersion2
Event Listings The event listings API returns all FTC official regional events in a particular season.
-
#v20_season_events_get_with_http_info(season, opts = {}) ⇒ Array<(SeasonEventListingsModelVersion2, Integer, Hash)>
Event Listings The event listings API returns all FTC official regional events in a particular season.
-
#v20_season_get(season, opts = {}) ⇒ SeasonSummaryModelVersion2
Season Summary The season summary API returns a high level glance of a particular FTC season.
-
#v20_season_get_with_http_info(season, opts = {}) ⇒ Array<(SeasonSummaryModelVersion2, Integer, Hash)>
Season Summary The season summary API returns a high level glance of a particular FTC season.
-
#v20_season_teams_get(season, opts = {}) ⇒ SeasonTeamListingsModelVersion2
Team Listings The team listings API returns all FTC official teams in a particular season.
-
#v20_season_teams_get_with_http_info(season, opts = {}) ⇒ Array<(SeasonTeamListingsModelVersion2, Integer, Hash)>
Team Listings The team listings API returns all FTC official teams in a particular season.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ SeasonDataApi
Returns a new instance of SeasonDataApi.
16 17 18 |
# File 'lib/ftc_events_client/api/season_data_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/season_data_api.rb', line 14 def api_client @api_client end |
Instance Method Details
#v20_season_events_get(season, opts = {}) ⇒ SeasonEventListingsModelVersion2
Event Listings The event listings API returns all FTC official regional events in a particular season. You can specify an ‘eventCode` if you would only like data about one specific event. If you specify an `eventCode` you cannot specify any other optional parameters. Alternately, you can specify a `teamNumber` to retrieve only the listings of events being attended by the particular team. If you specify a `teamNumber` you cannot specify an `eventCode`. The response for event listings contains a special field called divisionCode. For example, the FIRST Championship contains two Divisions. As an example of a response, the event listings for a Division will have a divisionCode that matches the FIRST Championship event code (as they are divisions of that event). This allows you to see the full structure of events, and how they relate to each other.
26 27 28 29 |
# File 'lib/ftc_events_client/api/season_data_api.rb', line 26 def v20_season_events_get(season, opts = {}) data, _status_code, _headers = v20_season_events_get_with_http_info(season, opts) data end |
#v20_season_events_get_with_http_info(season, opts = {}) ⇒ Array<(SeasonEventListingsModelVersion2, Integer, Hash)>
Event Listings The event listings API returns all FTC official regional events in a particular season. You can specify an `eventCode` if you would only like data about one specific event. If you specify an `eventCode` you cannot specify any other optional parameters. Alternately, you can specify a `teamNumber` to retrieve only the listings of events being attended by the particular team. If you specify a `teamNumber` you cannot specify an `eventCode`. The response for event listings contains a special field called divisionCode. For example, the FIRST Championship contains two Divisions. As an example of a response, the event listings for a Division will have a divisionCode that matches the FIRST Championship event code (as they are divisions of that event). This allows you to see the full structure of events, and how they relate to each other.
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/season_data_api.rb', line 38 def v20_season_events_get_with_http_info(season, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SeasonDataApi.v20_season_events_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 SeasonDataApi.v20_season_events_get" end # resource path local_var_path = '/v2.0/{season}/events'.sub('{' + 'season' + '}', season.to_s) # query parameters query_params = opts[:query_params] || {} query_params[:'eventCode'] = opts[:'event_code'] if !opts[:'event_code'].nil? query_params[:'teamNumber'] = opts[:'team_number'] if !opts[:'team_number'].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] || 'SeasonEventListingsModelVersion2' 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: SeasonDataApi#v20_season_events_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#v20_season_get(season, opts = {}) ⇒ SeasonSummaryModelVersion2
Season Summary The season summary API returns a high level glance of a particular FTC season.
86 87 88 89 |
# File 'lib/ftc_events_client/api/season_data_api.rb', line 86 def v20_season_get(season, opts = {}) data, _status_code, _headers = v20_season_get_with_http_info(season, opts) data end |
#v20_season_get_with_http_info(season, opts = {}) ⇒ Array<(SeasonSummaryModelVersion2, Integer, Hash)>
Season Summary The season summary API returns a high level glance of a particular FTC season.
96 97 98 99 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 |
# File 'lib/ftc_events_client/api/season_data_api.rb', line 96 def v20_season_get_with_http_info(season, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SeasonDataApi.v20_season_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 SeasonDataApi.v20_season_get" end # resource path local_var_path = '/v2.0/{season}'.sub('{' + 'season' + '}', season.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] || 'SeasonSummaryModelVersion2' 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: SeasonDataApi#v20_season_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#v20_season_teams_get(season, opts = {}) ⇒ SeasonTeamListingsModelVersion2
Team Listings The team listings API returns all FTC official teams in a particular season. If specified, the ‘teamNumber` parameter will return only one result with the details of the requested `teamNumber`. Alternately, the `eventCode` parameter allows sorting of the team list to only those teams attending a particular event in the particular season. If you specify a teamNumber parameter, you cannot additionally specify an `eventCode` and/or `state` in the same request, or you will receive an HTTP 501. If you specify the `state` parameter, it should be the full legal name of the US state or international state/prov, such as New Hampshire or Ontario. Values on this endpoint are "pass through" values from the TIMS registration system. As such, if the team does not specify a value for a field, it may be presented in the API as null.
146 147 148 149 |
# File 'lib/ftc_events_client/api/season_data_api.rb', line 146 def v20_season_teams_get(season, opts = {}) data, _status_code, _headers = v20_season_teams_get_with_http_info(season, opts) data end |
#v20_season_teams_get_with_http_info(season, opts = {}) ⇒ Array<(SeasonTeamListingsModelVersion2, Integer, Hash)>
Team Listings The team listings API returns all FTC official teams in a particular season. If specified, the `teamNumber` parameter will return only one result with the details of the requested `teamNumber`. Alternately, the `eventCode` parameter allows sorting of the team list to only those teams attending a particular event in the particular season. If you specify a teamNumber parameter, you cannot additionally specify an `eventCode` and/or `state` in the same request, or you will receive an HTTP 501. If you specify the `state` parameter, it should be the full legal name of the US state or international state/prov, such as New Hampshire or Ontario. Values on this endpoint are "pass through" values from the TIMS registration system. As such, if the team does not specify a value for a field, it may be presented in the API as null.
160 161 162 163 164 165 166 167 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 |
# File 'lib/ftc_events_client/api/season_data_api.rb', line 160 def v20_season_teams_get_with_http_info(season, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SeasonDataApi.v20_season_teams_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 SeasonDataApi.v20_season_teams_get" end # resource path local_var_path = '/v2.0/{season}/teams'.sub('{' + 'season' + '}', season.to_s) # query parameters query_params = opts[:query_params] || {} query_params[:'teamNumber'] = opts[:'team_number'] if !opts[:'team_number'].nil? query_params[:'eventCode'] = opts[:'event_code'] if !opts[:'event_code'].nil? query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].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] || 'SeasonTeamListingsModelVersion2' 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: SeasonDataApi#v20_season_teams_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |