Class: SwaggerClient::SiteApi
- Inherits:
-
Object
- Object
- SwaggerClient::SiteApi
- Defined in:
- lib/swagger_client/api/site_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) ⇒ SiteApi
constructor
A new instance of SiteApi.
-
#site_get_activation_code(version, opts = {}) ⇒ GetActivationCodeResponse
Get an activation code for a site.
-
#site_get_activation_code_with_http_info(version, opts = {}) ⇒ Array<(GetActivationCodeResponse, Fixnum, Hash)>
Get an activation code for a site.
-
#site_get_locations(site_id, version, opts = {}) ⇒ GetLocationsResponse
Get locations for a site.
-
#site_get_locations_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetLocationsResponse, Fixnum, Hash)>
Get locations for a site.
-
#site_get_programs(site_id, version, opts = {}) ⇒ GetProgramsResponse
Get service categories offered at a site.
-
#site_get_programs_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetProgramsResponse, Fixnum, Hash)>
Get service categories offered at a site.
-
#site_get_resources(site_id, version, opts = {}) ⇒ GetResourcesResponse
Get resources used at a site.
-
#site_get_resources_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetResourcesResponse, Fixnum, Hash)>
Get resources used at a site.
-
#site_get_session_types(site_id, version, opts = {}) ⇒ GetSessionTypesResponse
Get the session types used at a site.
-
#site_get_session_types_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetSessionTypesResponse, Fixnum, Hash)>
Get the session types used at a site.
-
#site_get_sites(version, opts = {}) ⇒ GetSitesResponse
Get all sites that can be accessed by an API Key.
-
#site_get_sites_with_http_info(version, opts = {}) ⇒ Array<(GetSitesResponse, Fixnum, Hash)>
Get all sites that can be accessed by an API Key.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/swagger_client/api/site_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#site_get_activation_code(version, opts = {}) ⇒ GetActivationCodeResponse
Get an activation code for a site. Before you can use this endpoint, MINDBODY must approve your developer account for live access. If you have finished testing in the sandbox and are ready to begin working with MINDBODY customers, log into your account and request to go live. See [Accessing Business Data From MINDBODY](developers.mindbodyonline.com/PublicDocumentation/V6#accessing-business-data) for more information about the activation code and how to use it. Once you are approved, this endpoint returns an activation code.This endpoint supports only one site per call.
28 29 30 31 |
# File 'lib/swagger_client/api/site_api.rb', line 28 def site_get_activation_code(version, opts = {}) data, _status_code, _headers = site_get_activation_code_with_http_info(version, opts) data end |
#site_get_activation_code_with_http_info(version, opts = {}) ⇒ Array<(GetActivationCodeResponse, Fixnum, Hash)>
Get an activation code for a site. Before you can use this endpoint, MINDBODY must approve your developer account for live access. If you have finished testing in the sandbox and are ready to begin working with MINDBODY customers, log into your account and request to go live. See [Accessing Business Data From MINDBODY](developers.mindbodyonline.com/PublicDocumentation/V6#accessing-business-data) for more information about the activation code and how to use it. Once you are approved, this endpoint returns an activation code.This endpoint supports only one site per call.
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 |
# File 'lib/swagger_client/api/site_api.rb', line 39 def site_get_activation_code_with_http_info(version, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SiteApi.site_get_activation_code ...' end # verify the required parameter 'version' is set if @api_client.config.client_side_validation && version.nil? fail ArgumentError, "Missing the required parameter 'version' when calling SiteApi.site_get_activation_code" end # resource path local_var_path = '/public/v{version}/site/activationcode'.sub('{' + 'version' + '}', version.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data']) header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil? # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] 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 => 'GetActivationCodeResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: SiteApi#site_get_activation_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#site_get_locations(site_id, version, opts = {}) ⇒ GetLocationsResponse
Get locations for a site.
85 86 87 88 |
# File 'lib/swagger_client/api/site_api.rb', line 85 def site_get_locations(site_id, version, opts = {}) data, _status_code, _headers = site_get_locations_with_http_info(site_id, version, opts) data end |
#site_get_locations_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetLocationsResponse, Fixnum, Hash)>
Get locations for a site.
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 137 138 139 140 141 142 |
# File 'lib/swagger_client/api/site_api.rb', line 98 def site_get_locations_with_http_info(site_id, version, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SiteApi.site_get_locations ...' end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling SiteApi.site_get_locations" end # verify the required parameter 'version' is set if @api_client.config.client_side_validation && version.nil? fail ArgumentError, "Missing the required parameter 'version' when calling SiteApi.site_get_locations" end # resource path local_var_path = '/public/v{version}/site/locations'.sub('{' + 'version' + '}', version.to_s) # query parameters query_params = {} query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil? query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data']) header_params[:'siteId'] = site_id header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil? # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] 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 => 'GetLocationsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: SiteApi#site_get_locations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#site_get_programs(site_id, version, opts = {}) ⇒ GetProgramsResponse
Get service categories offered at a site.
153 154 155 156 |
# File 'lib/swagger_client/api/site_api.rb', line 153 def site_get_programs(site_id, version, opts = {}) data, _status_code, _headers = site_get_programs_with_http_info(site_id, version, opts) data end |
#site_get_programs_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetProgramsResponse, Fixnum, Hash)>
Get service categories offered at a site.
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 217 |
# File 'lib/swagger_client/api/site_api.rb', line 168 def site_get_programs_with_http_info(site_id, version, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SiteApi.site_get_programs ...' end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling SiteApi.site_get_programs" end # verify the required parameter 'version' is set if @api_client.config.client_side_validation && version.nil? fail ArgumentError, "Missing the required parameter 'version' when calling SiteApi.site_get_programs" end if @api_client.config.client_side_validation && opts[:'request_schedule_type'] && !['All', 'Class', 'Enrollment', 'Appointment', 'Resource', 'Media', 'Arrival'].include?(opts[:'request_schedule_type']) fail ArgumentError, 'invalid value for "request_schedule_type", must be one of All, Class, Enrollment, Appointment, Resource, Media, Arrival' end # resource path local_var_path = '/public/v{version}/site/programs'.sub('{' + 'version' + '}', version.to_s) # query parameters query_params = {} query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil? query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil? query_params[:'request.onlineOnly'] = opts[:'request_online_only'] if !opts[:'request_online_only'].nil? query_params[:'request.scheduleType'] = opts[:'request_schedule_type'] if !opts[:'request_schedule_type'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data']) header_params[:'siteId'] = site_id header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil? # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] 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 => 'GetProgramsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: SiteApi#site_get_programs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#site_get_resources(site_id, version, opts = {}) ⇒ GetResourcesResponse
Get resources used at a site.
230 231 232 233 |
# File 'lib/swagger_client/api/site_api.rb', line 230 def site_get_resources(site_id, version, opts = {}) data, _status_code, _headers = site_get_resources_with_http_info(site_id, version, opts) data end |
#site_get_resources_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetResourcesResponse, Fixnum, Hash)>
Get resources used at a site.
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 |
# File 'lib/swagger_client/api/site_api.rb', line 247 def site_get_resources_with_http_info(site_id, version, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SiteApi.site_get_resources ...' end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling SiteApi.site_get_resources" end # verify the required parameter 'version' is set if @api_client.config.client_side_validation && version.nil? fail ArgumentError, "Missing the required parameter 'version' when calling SiteApi.site_get_resources" end # resource path local_var_path = '/public/v{version}/site/resources'.sub('{' + 'version' + '}', version.to_s) # query parameters query_params = {} query_params[:'request.endDateTime'] = opts[:'request_end_date_time'] if !opts[:'request_end_date_time'].nil? query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil? query_params[:'request.locationId'] = opts[:'request_location_id'] if !opts[:'request_location_id'].nil? query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil? query_params[:'request.sessionTypeIds'] = @api_client.build_collection_param(opts[:'request_session_type_ids'], :multi) if !opts[:'request_session_type_ids'].nil? query_params[:'request.startDateTime'] = opts[:'request_start_date_time'] if !opts[:'request_start_date_time'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data']) header_params[:'siteId'] = site_id header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil? # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] 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 => 'GetResourcesResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: SiteApi#site_get_resources\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#site_get_session_types(site_id, version, opts = {}) ⇒ GetSessionTypesResponse
Get the session types used at a site.
306 307 308 309 |
# File 'lib/swagger_client/api/site_api.rb', line 306 def site_get_session_types(site_id, version, opts = {}) data, _status_code, _headers = site_get_session_types_with_http_info(site_id, version, opts) data end |
#site_get_session_types_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetSessionTypesResponse, Fixnum, Hash)>
Get the session types used at a site.
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 |
# File 'lib/swagger_client/api/site_api.rb', line 321 def site_get_session_types_with_http_info(site_id, version, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SiteApi.site_get_session_types ...' end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling SiteApi.site_get_session_types" end # verify the required parameter 'version' is set if @api_client.config.client_side_validation && version.nil? fail ArgumentError, "Missing the required parameter 'version' when calling SiteApi.site_get_session_types" end # resource path local_var_path = '/public/v{version}/site/sessiontypes'.sub('{' + 'version' + '}', version.to_s) # query parameters query_params = {} query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil? query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil? query_params[:'request.onlineOnly'] = opts[:'request_online_only'] if !opts[:'request_online_only'].nil? query_params[:'request.programIDs'] = @api_client.build_collection_param(opts[:'request_program_i_ds'], :multi) if !opts[:'request_program_i_ds'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data']) header_params[:'siteId'] = site_id header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil? # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] 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 => 'GetSessionTypesResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: SiteApi#site_get_session_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#site_get_sites(version, opts = {}) ⇒ GetSitesResponse
Get all sites that can be accessed by an API Key. Gets a list of sites that the developer has permission to view. * Passing in no ‘SiteIds` returns all sites that the developer has access to. * Passing in one `SiteIds` returns more detailed information about the specified site.
377 378 379 380 |
# File 'lib/swagger_client/api/site_api.rb', line 377 def site_get_sites(version, opts = {}) data, _status_code, _headers = site_get_sites_with_http_info(version, opts) data end |
#site_get_sites_with_http_info(version, opts = {}) ⇒ Array<(GetSitesResponse, Fixnum, Hash)>
Get all sites that can be accessed by an API Key. Gets a list of sites that the developer has permission to view. * Passing in no `SiteIds` returns all sites that the developer has access to. * Passing in one `SiteIds` returns more detailed information about the specified site.
391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 |
# File 'lib/swagger_client/api/site_api.rb', line 391 def site_get_sites_with_http_info(version, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SiteApi.site_get_sites ...' end # verify the required parameter 'version' is set if @api_client.config.client_side_validation && version.nil? fail ArgumentError, "Missing the required parameter 'version' when calling SiteApi.site_get_sites" end # resource path local_var_path = '/public/v{version}/site/sites'.sub('{' + 'version' + '}', version.to_s) # query parameters query_params = {} query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil? query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil? query_params[:'request.siteIds'] = @api_client.build_collection_param(opts[:'request_site_ids'], :multi) if !opts[:'request_site_ids'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data']) header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil? # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] 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 => 'GetSitesResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: SiteApi#site_get_sites\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |