Class: FtcApiV3Client::RegionsApi
- Inherits:
-
Object
- Object
- FtcApiV3Client::RegionsApi
- Defined in:
- lib/ftc_api_v3_client/api/regions_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_region(cmp_year, region_code, opts = {}) ⇒ ApiV3Region
Get region from a season Gets details for a single region for a season.
-
#get_region_with_http_info(cmp_year, region_code, opts = {}) ⇒ Array<(ApiV3Region, Integer, Hash)>
Get region from a season Gets details for a single region for a season.
-
#initialize(api_client = ApiClient.default) ⇒ RegionsApi
constructor
A new instance of RegionsApi.
-
#list_region_events(cmp_year, region_code, opts = {}) ⇒ ApiV3Events
List events for a regions Lists all events in a region.
-
#list_region_events_with_http_info(cmp_year, region_code, opts = {}) ⇒ Array<(ApiV3Events, Integer, Hash)>
List events for a regions Lists all events in a region.
-
#list_region_teams(cmp_year, region_code, opts = {}) ⇒ ApiV3Teams
List teams for a region Lists all registered teams assigned to the given region.
-
#list_region_teams_with_http_info(cmp_year, region_code, opts = {}) ⇒ Array<(ApiV3Teams, Integer, Hash)>
List teams for a region Lists all registered teams assigned to the given region.
-
#list_regions(cmp_year, opts = {}) ⇒ ApiV3Regions
List regions for a season Lists all active regions for a season.
-
#list_regions_with_http_info(cmp_year, opts = {}) ⇒ Array<(ApiV3Regions, Integer, Hash)>
List regions for a season Lists all active regions for a season.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ RegionsApi
Returns a new instance of RegionsApi.
19 20 21 |
# File 'lib/ftc_api_v3_client/api/regions_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/ftc_api_v3_client/api/regions_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_region(cmp_year, region_code, opts = {}) ⇒ ApiV3Region
Get region from a season Gets details for a single region for a season.
28 29 30 31 |
# File 'lib/ftc_api_v3_client/api/regions_api.rb', line 28 def get_region(cmp_year, region_code, opts = {}) data, _status_code, _headers = get_region_with_http_info(cmp_year, region_code, opts) data end |
#get_region_with_http_info(cmp_year, region_code, opts = {}) ⇒ Array<(ApiV3Region, Integer, Hash)>
Get region from a season Gets details for a single region for a season.
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 81 |
# File 'lib/ftc_api_v3_client/api/regions_api.rb', line 39 def get_region_with_http_info(cmp_year, region_code, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RegionsApi.get_region ...' end # resource path local_var_path = '/api/v3/seasons/{cmpYear}/regions/{regionCode}'.sub('{' + 'cmpYear' + '}', CGI.escape(cmp_year.to_s)).sub('{' + 'regionCode' + '}', CGI.escape(region_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']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ApiV3Region' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"RegionsApi.get_region", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RegionsApi#get_region\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_region_events(cmp_year, region_code, opts = {}) ⇒ ApiV3Events
List events for a regions Lists all events in a region
89 90 91 92 |
# File 'lib/ftc_api_v3_client/api/regions_api.rb', line 89 def list_region_events(cmp_year, region_code, opts = {}) data, _status_code, _headers = list_region_events_with_http_info(cmp_year, region_code, opts) data end |
#list_region_events_with_http_info(cmp_year, region_code, opts = {}) ⇒ Array<(ApiV3Events, Integer, Hash)>
List events for a regions Lists all events in a region
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 |
# File 'lib/ftc_api_v3_client/api/regions_api.rb', line 100 def list_region_events_with_http_info(cmp_year, region_code, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RegionsApi.list_region_events ...' end # resource path local_var_path = '/api/v3/seasons/{cmpYear}/regions/{regionCode}/events'.sub('{' + 'cmpYear' + '}', CGI.escape(cmp_year.to_s)).sub('{' + 'regionCode' + '}', CGI.escape(region_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']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ApiV3Events' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"RegionsApi.list_region_events", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RegionsApi#list_region_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_region_teams(cmp_year, region_code, opts = {}) ⇒ ApiV3Teams
List teams for a region Lists all registered teams assigned to the given region.
150 151 152 153 |
# File 'lib/ftc_api_v3_client/api/regions_api.rb', line 150 def list_region_teams(cmp_year, region_code, opts = {}) data, _status_code, _headers = list_region_teams_with_http_info(cmp_year, region_code, opts) data end |
#list_region_teams_with_http_info(cmp_year, region_code, opts = {}) ⇒ Array<(ApiV3Teams, Integer, Hash)>
List teams for a region Lists all registered teams assigned to the given region.
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 |
# File 'lib/ftc_api_v3_client/api/regions_api.rb', line 161 def list_region_teams_with_http_info(cmp_year, region_code, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RegionsApi.list_region_teams ...' end # resource path local_var_path = '/api/v3/seasons/{cmpYear}/regions/{regionCode}/teams'.sub('{' + 'cmpYear' + '}', CGI.escape(cmp_year.to_s)).sub('{' + 'regionCode' + '}', CGI.escape(region_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']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ApiV3Teams' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"RegionsApi.list_region_teams", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RegionsApi#list_region_teams\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_regions(cmp_year, opts = {}) ⇒ ApiV3Regions
List regions for a season Lists all active regions for a season.
210 211 212 213 |
# File 'lib/ftc_api_v3_client/api/regions_api.rb', line 210 def list_regions(cmp_year, opts = {}) data, _status_code, _headers = list_regions_with_http_info(cmp_year, opts) data end |
#list_regions_with_http_info(cmp_year, opts = {}) ⇒ Array<(ApiV3Regions, Integer, Hash)>
List regions for a season Lists all active regions for a season.
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 |
# File 'lib/ftc_api_v3_client/api/regions_api.rb', line 220 def list_regions_with_http_info(cmp_year, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RegionsApi.list_regions ...' end # resource path local_var_path = '/api/v3/seasons/{cmpYear}/regions'.sub('{' + 'cmpYear' + '}', CGI.escape(cmp_year.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']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ApiV3Regions' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"RegionsApi.list_regions", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RegionsApi#list_regions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |