Class: Spatio::CalendarApi
- Inherits:
-
Object
- Object
- Spatio::CalendarApi
- Defined in:
- lib/spatio-sdk/api/calendar_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_calendar_event(create_event_request, opts = {}) ⇒ CreateCalendarEvent201Response
Create a calendar event.
-
#create_calendar_event_with_http_info(create_event_request, opts = {}) ⇒ Array<(CreateCalendarEvent201Response, Integer, Hash)>
Create a calendar event.
-
#delete_calendar_event(id, account_id, opts = {}) ⇒ CalendarOperationResult
Delete an event.
-
#delete_calendar_event_with_http_info(id, account_id, opts = {}) ⇒ Array<(CalendarOperationResult, Integer, Hash)>
Delete an event.
-
#get_calendar_capabilities(account_id, opts = {}) ⇒ CalendarCapabilitiesResponse
Per-account capability flags.
-
#get_calendar_capabilities_with_http_info(account_id, opts = {}) ⇒ Array<(CalendarCapabilitiesResponse, Integer, Hash)>
Per-account capability flags.
-
#get_calendar_event(id, account_id, opts = {}) ⇒ SpatioEvent
Fetch one event.
-
#get_calendar_event_with_http_info(id, account_id, opts = {}) ⇒ Array<(SpatioEvent, Integer, Hash)>
Fetch one event.
-
#initialize(api_client = ApiClient.default) ⇒ CalendarApi
constructor
A new instance of CalendarApi.
-
#list_calendar_events(opts = {}) ⇒ ListCalendarEvents200Response
List calendar events across connected accounts.
-
#list_calendar_events_with_http_info(opts = {}) ⇒ Array<(ListCalendarEvents200Response, Integer, Hash)>
List calendar events across connected accounts.
-
#list_calendar_providers(opts = {}) ⇒ CalendarProvidersInfo
List supported calendar providers.
-
#list_calendar_providers_with_http_info(opts = {}) ⇒ Array<(CalendarProvidersInfo, Integer, Hash)>
List supported calendar providers.
-
#sync_calendar(opts = {}) ⇒ CalendarSyncResponse
Trigger a sync across connected calendar accounts.
-
#sync_calendar_with_http_info(opts = {}) ⇒ Array<(CalendarSyncResponse, Integer, Hash)>
Trigger a sync across connected calendar accounts.
-
#update_calendar_event(id, update_event_request, opts = {}) ⇒ CreateCalendarEvent201Response
Update an event (sparse).
-
#update_calendar_event_with_http_info(id, update_event_request, opts = {}) ⇒ Array<(CreateCalendarEvent201Response, Integer, Hash)>
Update an event (sparse).
-
#workspace_create_calendar_event(org, workspace, request_body, opts = {}) ⇒ Hash<String, Object>
Workspace-scoped create-event (RBAC-protected).
-
#workspace_create_calendar_event_with_http_info(org, workspace, request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Workspace-scoped create-event (RBAC-protected).
- #workspace_delete_calendar_event(org, workspace, id, opts = {}) ⇒ nil
-
#workspace_delete_calendar_event_with_http_info(org, workspace, id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Nil, response status code and response headers.
- #workspace_get_calendar_event(org, workspace, id, opts = {}) ⇒ Hash<String, Object>
-
#workspace_get_calendar_event_with_http_info(org, workspace, id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Hash<String, Object> data, response status code and response headers.
-
#workspace_list_calendar_events(org, workspace, opts = {}) ⇒ Hash<String, Object>
Workspace-scoped list-events (RBAC-protected).
-
#workspace_list_calendar_events_with_http_info(org, workspace, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Workspace-scoped list-events (RBAC-protected).
-
#workspace_list_calendar_providers(org, workspace, opts = {}) ⇒ Hash<String, Object>
Workspace-scoped calendar providers.
-
#workspace_list_calendar_providers_with_http_info(org, workspace, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Workspace-scoped calendar providers.
- #workspace_update_calendar_event(org, workspace, id, request_body, opts = {}) ⇒ Hash<String, Object>
-
#workspace_update_calendar_event_with_http_info(org, workspace, id, request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Hash<String, Object> data, response status code and response headers.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ CalendarApi
Returns a new instance of CalendarApi.
19 20 21 |
# File 'lib/spatio-sdk/api/calendar_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/spatio-sdk/api/calendar_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_calendar_event(create_event_request, opts = {}) ⇒ CreateCalendarEvent201Response
Create a calendar event. Single-account create. ‘account_id` is required (no auto-resolve for write operations). Reminder array is mirrored into native tasks under the hood; conference data is auto-attached when `conference_type` is supplied.
28 29 30 31 |
# File 'lib/spatio-sdk/api/calendar_api.rb', line 28 def create_calendar_event(create_event_request, opts = {}) data, _status_code, _headers = create_calendar_event_with_http_info(create_event_request, opts) data end |
#create_calendar_event_with_http_info(create_event_request, opts = {}) ⇒ Array<(CreateCalendarEvent201Response, Integer, Hash)>
Create a calendar event. Single-account create. `account_id` is required (no auto-resolve for write operations). Reminder array is mirrored into native tasks under the hood; conference data is auto-attached when `conference_type` is supplied.
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 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/spatio-sdk/api/calendar_api.rb', line 39 def create_calendar_event_with_http_info(create_event_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CalendarApi.create_calendar_event ...' end # verify the required parameter 'create_event_request' is set if @api_client.config.client_side_validation && create_event_request.nil? fail ArgumentError, "Missing the required parameter 'create_event_request' when calling CalendarApi.create_calendar_event" end # resource path local_var_path = '/v1/calendar/events' # 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'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_event_request) # return_type return_type = opts[:debug_return_type] || 'CreateCalendarEvent201Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"CalendarApi.create_calendar_event", :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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CalendarApi#create_calendar_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_calendar_event(id, account_id, opts = {}) ⇒ CalendarOperationResult
Delete an event. Hard delete (no soft-delete / trash). Cascades to any reminder tasks the platform created from this event.
100 101 102 103 |
# File 'lib/spatio-sdk/api/calendar_api.rb', line 100 def delete_calendar_event(id, account_id, opts = {}) data, _status_code, _headers = delete_calendar_event_with_http_info(id, account_id, opts) data end |
#delete_calendar_event_with_http_info(id, account_id, opts = {}) ⇒ Array<(CalendarOperationResult, Integer, Hash)>
Delete an event. Hard delete (no soft-delete / trash). Cascades to any reminder tasks the platform created from this event.
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 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 |
# File 'lib/spatio-sdk/api/calendar_api.rb', line 112 def delete_calendar_event_with_http_info(id, account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CalendarApi.delete_calendar_event ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling CalendarApi.delete_calendar_event" end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling CalendarApi.delete_calendar_event" end # resource path local_var_path = '/v1/calendar/events/{id}'.sub('{id}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'account_id'] = account_id # 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'] header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CalendarOperationResult' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"CalendarApi.delete_calendar_event", :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(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CalendarApi#delete_calendar_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_calendar_capabilities(account_id, opts = {}) ⇒ CalendarCapabilitiesResponse
Per-account capability flags. Returns the capabilities the provider declares for the given connected account. The renderer uses these to enable/disable form fields (recurrence picker, attendee inputs, etc.).
171 172 173 174 |
# File 'lib/spatio-sdk/api/calendar_api.rb', line 171 def get_calendar_capabilities(account_id, opts = {}) data, _status_code, _headers = get_calendar_capabilities_with_http_info(account_id, opts) data end |
#get_calendar_capabilities_with_http_info(account_id, opts = {}) ⇒ Array<(CalendarCapabilitiesResponse, Integer, Hash)>
Per-account capability flags. Returns the capabilities the provider declares for the given connected account. The renderer uses these to enable/disable form fields (recurrence picker, attendee inputs, etc.).
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 218 219 220 221 222 223 224 225 226 227 228 |
# File 'lib/spatio-sdk/api/calendar_api.rb', line 181 def get_calendar_capabilities_with_http_info(account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CalendarApi.get_calendar_capabilities ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling CalendarApi.get_calendar_capabilities" end # resource path local_var_path = '/v1/calendar/capabilities' # query parameters query_params = opts[:query_params] || {} query_params[:'account_id'] = account_id # 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] || 'CalendarCapabilitiesResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"CalendarApi.get_calendar_capabilities", :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: CalendarApi#get_calendar_capabilities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_calendar_event(id, account_id, opts = {}) ⇒ SpatioEvent
Fetch one event. Requires ‘?account_id=` to identify the source account. Response is the bare `Event` (not wrapped in CalendarOperationResult — distinct from the list/create/update shapes).
237 238 239 240 |
# File 'lib/spatio-sdk/api/calendar_api.rb', line 237 def get_calendar_event(id, account_id, opts = {}) data, _status_code, _headers = get_calendar_event_with_http_info(id, account_id, opts) data end |
#get_calendar_event_with_http_info(id, account_id, opts = {}) ⇒ Array<(SpatioEvent, Integer, Hash)>
Fetch one event. Requires `?account_id=` to identify the source account. Response is the bare `Event` (not wrapped in CalendarOperationResult — distinct from the list/create/update shapes).
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 296 297 298 299 300 301 |
# File 'lib/spatio-sdk/api/calendar_api.rb', line 249 def get_calendar_event_with_http_info(id, account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CalendarApi.get_calendar_event ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling CalendarApi.get_calendar_event" end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling CalendarApi.get_calendar_event" end # resource path local_var_path = '/v1/calendar/events/{id}'.sub('{id}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'account_id'] = account_id # 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'] header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'SpatioEvent' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"CalendarApi.get_calendar_event", :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: CalendarApi#get_calendar_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_calendar_events(opts = {}) ⇒ ListCalendarEvents200Response
List calendar events across connected accounts. Fan-out list. Returns events across every connected calendar provider unless filtered by ‘account_ids[]` or `providers[]`. Supports the cross-platform repeated-or-comma-separated filter syntax (`?account_ids=a&account_ids=b` or `?account_ids=a,b`). Time bounds (`timeMin` / `timeMax`) accept both RFC3339 and RFC3339Nano. The handler also accepts the snake_case `time_min` / `time_max` for direct curl callers; the spec models the camelCase form because that’s what the renderer and SDKs use.
313 314 315 316 |
# File 'lib/spatio-sdk/api/calendar_api.rb', line 313 def list_calendar_events(opts = {}) data, _status_code, _headers = list_calendar_events_with_http_info(opts) data end |
#list_calendar_events_with_http_info(opts = {}) ⇒ Array<(ListCalendarEvents200Response, Integer, Hash)>
List calendar events across connected accounts. Fan-out list. Returns events across every connected calendar provider unless filtered by `account_ids[]` or `providers[]`. Supports the cross-platform repeated-or-comma-separated filter syntax (`?account_ids=a&account_ids=b` or `?account_ids=a,b`). Time bounds (`timeMin` / `timeMax`) accept both RFC3339 and RFC3339Nano. The handler also accepts the snake_case `time_min` / `time_max` for direct curl callers; the spec models the camelCase form because that's what the renderer and SDKs use.
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 368 369 370 371 372 373 374 375 376 377 378 379 380 |
# File 'lib/spatio-sdk/api/calendar_api.rb', line 328 def list_calendar_events_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CalendarApi.list_calendar_events ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CalendarApi.list_calendar_events, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/calendar/events' # query parameters query_params = opts[:query_params] || {} query_params[:'account_ids'] = @api_client.build_collection_param(opts[:'account_ids'], :multi) if !opts[:'account_ids'].nil? query_params[:'providers'] = @api_client.build_collection_param(opts[:'providers'], :multi) if !opts[:'providers'].nil? query_params[:'timeMin'] = opts[:'time_min'] if !opts[:'time_min'].nil? query_params[:'timeMax'] = opts[:'time_max'] if !opts[:'time_max'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # 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'] header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListCalendarEvents200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"CalendarApi.list_calendar_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: CalendarApi#list_calendar_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_calendar_providers(opts = {}) ⇒ CalendarProvidersInfo
List supported calendar providers. Static list of provider ids the Calendar platform can connect to. Returned regardless of which providers the caller has actually authorized.
386 387 388 389 |
# File 'lib/spatio-sdk/api/calendar_api.rb', line 386 def list_calendar_providers(opts = {}) data, _status_code, _headers = list_calendar_providers_with_http_info(opts) data end |
#list_calendar_providers_with_http_info(opts = {}) ⇒ Array<(CalendarProvidersInfo, Integer, Hash)>
List supported calendar providers. Static list of provider ids the Calendar platform can connect to. Returned regardless of which providers the caller has actually authorized.
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 432 433 434 435 436 437 |
# File 'lib/spatio-sdk/api/calendar_api.rb', line 395 def list_calendar_providers_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CalendarApi.list_calendar_providers ...' end # resource path local_var_path = '/v1/calendar/providers' # 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] || 'CalendarProvidersInfo' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"CalendarApi.list_calendar_providers", :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: CalendarApi#list_calendar_providers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sync_calendar(opts = {}) ⇒ CalendarSyncResponse
Trigger a sync across connected calendar accounts. Enqueues sync jobs (one per connected calendar account) and returns immediately with the job ids. Pass ‘?wait=true` to block until all jobs complete (10-second polling budget); the response is then `200` with `waited: true` and a `timed_out` flag if any job didn’t finish in time.
444 445 446 447 |
# File 'lib/spatio-sdk/api/calendar_api.rb', line 444 def sync_calendar(opts = {}) data, _status_code, _headers = sync_calendar_with_http_info(opts) data end |
#sync_calendar_with_http_info(opts = {}) ⇒ Array<(CalendarSyncResponse, Integer, Hash)>
Trigger a sync across connected calendar accounts. Enqueues sync jobs (one per connected calendar account) and returns immediately with the job ids. Pass `?wait=true` to block until all jobs complete (10-second polling budget); the response is then `200` with `waited: true` and a `timed_out` flag if any job didn't finish in time.
454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 |
# File 'lib/spatio-sdk/api/calendar_api.rb', line 454 def sync_calendar_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CalendarApi.sync_calendar ...' end # resource path local_var_path = '/v1/calendar/sync' # query parameters query_params = opts[:query_params] || {} query_params[:'wait'] = opts[:'wait'] if !opts[:'wait'].nil? # 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] || 'CalendarSyncResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"CalendarApi.sync_calendar", :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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CalendarApi#sync_calendar\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_calendar_event(id, update_event_request, opts = {}) ⇒ CreateCalendarEvent201Response
Update an event (sparse). Partial update. ‘account_id` may be supplied in the body (preferred) or as `?account_id=` query param — the renderer’s update path puts it in the URL while create puts it in the body. ‘updates` is a free-form map; the platform’s capability gate rejects fields the provider doesn’t support.
507 508 509 510 |
# File 'lib/spatio-sdk/api/calendar_api.rb', line 507 def update_calendar_event(id, update_event_request, opts = {}) data, _status_code, _headers = update_calendar_event_with_http_info(id, update_event_request, opts) data end |
#update_calendar_event_with_http_info(id, update_event_request, opts = {}) ⇒ Array<(CreateCalendarEvent201Response, Integer, Hash)>
Update an event (sparse). Partial update. `account_id` may be supplied in the body (preferred) or as `?account_id=` query param — the renderer's update path puts it in the URL while create puts it in the body. `updates` is a free-form map; the platform's capability gate rejects fields the provider doesn't support.
520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 |
# File 'lib/spatio-sdk/api/calendar_api.rb', line 520 def update_calendar_event_with_http_info(id, update_event_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CalendarApi.update_calendar_event ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling CalendarApi.update_calendar_event" end # verify the required parameter 'update_event_request' is set if @api_client.config.client_side_validation && update_event_request.nil? fail ArgumentError, "Missing the required parameter 'update_event_request' when calling CalendarApi.update_calendar_event" end # resource path local_var_path = '/v1/calendar/events/{id}'.sub('{id}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil? # 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'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(update_event_request) # return_type return_type = opts[:debug_return_type] || 'CreateCalendarEvent201Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"CalendarApi.update_calendar_event", :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(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CalendarApi#update_calendar_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#workspace_create_calendar_event(org, workspace, request_body, opts = {}) ⇒ Hash<String, Object>
Workspace-scoped create-event (RBAC-protected).
585 586 587 588 |
# File 'lib/spatio-sdk/api/calendar_api.rb', line 585 def workspace_create_calendar_event(org, workspace, request_body, opts = {}) data, _status_code, _headers = workspace_create_calendar_event_with_http_info(org, workspace, request_body, opts) data end |
#workspace_create_calendar_event_with_http_info(org, workspace, request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Workspace-scoped create-event (RBAC-protected).
596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 |
# File 'lib/spatio-sdk/api/calendar_api.rb', line 596 def workspace_create_calendar_event_with_http_info(org, workspace, request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CalendarApi.workspace_create_calendar_event ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling CalendarApi.workspace_create_calendar_event" end # verify the required parameter 'workspace' is set if @api_client.config.client_side_validation && workspace.nil? fail ArgumentError, "Missing the required parameter 'workspace' when calling CalendarApi.workspace_create_calendar_event" end # verify the required parameter 'request_body' is set if @api_client.config.client_side_validation && request_body.nil? fail ArgumentError, "Missing the required parameter 'request_body' when calling CalendarApi.workspace_create_calendar_event" end # resource path local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/calendar/events'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.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'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body) # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"CalendarApi.workspace_create_calendar_event", :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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CalendarApi#workspace_create_calendar_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#workspace_delete_calendar_event(org, workspace, id, opts = {}) ⇒ nil
662 663 664 665 |
# File 'lib/spatio-sdk/api/calendar_api.rb', line 662 def workspace_delete_calendar_event(org, workspace, id, opts = {}) workspace_delete_calendar_event_with_http_info(org, workspace, id, opts) nil end |
#workspace_delete_calendar_event_with_http_info(org, workspace, id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Returns nil, response status code and response headers.
672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 |
# File 'lib/spatio-sdk/api/calendar_api.rb', line 672 def workspace_delete_calendar_event_with_http_info(org, workspace, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CalendarApi.workspace_delete_calendar_event ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling CalendarApi.workspace_delete_calendar_event" end # verify the required parameter 'workspace' is set if @api_client.config.client_side_validation && workspace.nil? fail ArgumentError, "Missing the required parameter 'workspace' when calling CalendarApi.workspace_delete_calendar_event" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling CalendarApi.workspace_delete_calendar_event" end # resource path local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/calendar/events/{id}'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{id}', CGI.escape(id.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] # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"CalendarApi.workspace_delete_calendar_event", :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(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CalendarApi#workspace_delete_calendar_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#workspace_get_calendar_event(org, workspace, id, opts = {}) ⇒ Hash<String, Object>
733 734 735 736 |
# File 'lib/spatio-sdk/api/calendar_api.rb', line 733 def workspace_get_calendar_event(org, workspace, id, opts = {}) data, _status_code, _headers = workspace_get_calendar_event_with_http_info(org, workspace, id, opts) data end |
#workspace_get_calendar_event_with_http_info(org, workspace, id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Returns Hash<String, Object> data, response status code and response headers.
743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 |
# File 'lib/spatio-sdk/api/calendar_api.rb', line 743 def workspace_get_calendar_event_with_http_info(org, workspace, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CalendarApi.workspace_get_calendar_event ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling CalendarApi.workspace_get_calendar_event" end # verify the required parameter 'workspace' is set if @api_client.config.client_side_validation && workspace.nil? fail ArgumentError, "Missing the required parameter 'workspace' when calling CalendarApi.workspace_get_calendar_event" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling CalendarApi.workspace_get_calendar_event" end # resource path local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/calendar/events/{id}'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{id}', CGI.escape(id.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] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"CalendarApi.workspace_get_calendar_event", :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: CalendarApi#workspace_get_calendar_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#workspace_list_calendar_events(org, workspace, opts = {}) ⇒ Hash<String, Object>
Workspace-scoped list-events (RBAC-protected).
804 805 806 807 |
# File 'lib/spatio-sdk/api/calendar_api.rb', line 804 def workspace_list_calendar_events(org, workspace, opts = {}) data, _status_code, _headers = workspace_list_calendar_events_with_http_info(org, workspace, opts) data end |
#workspace_list_calendar_events_with_http_info(org, workspace, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Workspace-scoped list-events (RBAC-protected).
814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 |
# File 'lib/spatio-sdk/api/calendar_api.rb', line 814 def workspace_list_calendar_events_with_http_info(org, workspace, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CalendarApi.workspace_list_calendar_events ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling CalendarApi.workspace_list_calendar_events" end # verify the required parameter 'workspace' is set if @api_client.config.client_side_validation && workspace.nil? fail ArgumentError, "Missing the required parameter 'workspace' when calling CalendarApi.workspace_list_calendar_events" end # resource path local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/calendar/events'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.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] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"CalendarApi.workspace_list_calendar_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: CalendarApi#workspace_list_calendar_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#workspace_list_calendar_providers(org, workspace, opts = {}) ⇒ Hash<String, Object>
Workspace-scoped calendar providers.
871 872 873 874 |
# File 'lib/spatio-sdk/api/calendar_api.rb', line 871 def workspace_list_calendar_providers(org, workspace, opts = {}) data, _status_code, _headers = workspace_list_calendar_providers_with_http_info(org, workspace, opts) data end |
#workspace_list_calendar_providers_with_http_info(org, workspace, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Workspace-scoped calendar providers.
881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 |
# File 'lib/spatio-sdk/api/calendar_api.rb', line 881 def workspace_list_calendar_providers_with_http_info(org, workspace, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CalendarApi.workspace_list_calendar_providers ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling CalendarApi.workspace_list_calendar_providers" end # verify the required parameter 'workspace' is set if @api_client.config.client_side_validation && workspace.nil? fail ArgumentError, "Missing the required parameter 'workspace' when calling CalendarApi.workspace_list_calendar_providers" end # resource path local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/calendar/providers'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.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] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"CalendarApi.workspace_list_calendar_providers", :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: CalendarApi#workspace_list_calendar_providers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#workspace_update_calendar_event(org, workspace, id, request_body, opts = {}) ⇒ Hash<String, Object>
939 940 941 942 |
# File 'lib/spatio-sdk/api/calendar_api.rb', line 939 def workspace_update_calendar_event(org, workspace, id, request_body, opts = {}) data, _status_code, _headers = workspace_update_calendar_event_with_http_info(org, workspace, id, request_body, opts) data end |
#workspace_update_calendar_event_with_http_info(org, workspace, id, request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Returns Hash<String, Object> data, response status code and response headers.
950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 |
# File 'lib/spatio-sdk/api/calendar_api.rb', line 950 def workspace_update_calendar_event_with_http_info(org, workspace, id, request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CalendarApi.workspace_update_calendar_event ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling CalendarApi.workspace_update_calendar_event" end # verify the required parameter 'workspace' is set if @api_client.config.client_side_validation && workspace.nil? fail ArgumentError, "Missing the required parameter 'workspace' when calling CalendarApi.workspace_update_calendar_event" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling CalendarApi.workspace_update_calendar_event" end # verify the required parameter 'request_body' is set if @api_client.config.client_side_validation && request_body.nil? fail ArgumentError, "Missing the required parameter 'request_body' when calling CalendarApi.workspace_update_calendar_event" end # resource path local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/calendar/events/{id}'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{id}', CGI.escape(id.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'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body) # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"CalendarApi.workspace_update_calendar_event", :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(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CalendarApi#workspace_update_calendar_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |