deleteCalendarEventWithHttpInfo method
Delete an event.
Hard delete (no soft-delete / trash). Cascades to any reminder tasks the platform created from this event.
Note: This method returns the HTTP Response.
Parameters:
-
String id (required): Event id.
-
String accountId (required): Connected-account id (snake_case in this platform — the rest of the SpatioAPI uses
accountId). Required for single-event operations. -
String xWorkspaceID: Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
Implementation
Future<Response> deleteCalendarEventWithHttpInfo(String id, String accountId, { String? xWorkspaceID, }) async {
// ignore: prefer_const_declarations
final path = r'/v1/calendar/events/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
queryParams.addAll(_queryParams('', 'account_id', accountId));
if (xWorkspaceID != null) {
headerParams[r'X-Workspace-ID'] = parameterToString(xWorkspaceID);
}
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'DELETE',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}