getCalendarEventWithHttpInfo method
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).
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> getCalendarEventWithHttpInfo(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,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}