syncCalendarWithHttpInfo method

Future<Response> syncCalendarWithHttpInfo({
  1. bool? wait,
})

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.

Note: This method returns the HTTP Response.

Parameters:

  • bool wait: Block until all sync jobs finish (10s timeout).

Implementation

Future<Response> syncCalendarWithHttpInfo({ bool? wait, }) async {
  // ignore: prefer_const_declarations
  final path = r'/v1/calendar/sync';

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  if (wait != null) {
    queryParams.addAll(_queryParams('', 'wait', wait));
  }

  const contentTypes = <String>[];


  return apiClient.invokeAPI(
    path,
    'POST',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}