getAvailabilitiesByPeriodAndCalendarItemTypeId method

Future<List<int>?> getAvailabilitiesByPeriodAndCalendarItemTypeId(
  1. String groupId,
  2. String userId,
  3. String getCalendarItemTypeId,
  4. int startDate,
  5. int endDate,
  6. String hcpId, {
  7. int? limit,
})

Get Availabilities for HCP and appointmentType

The start of the slot is returned in YYYYDDMMHHmmss format and only slots belonging to public time tables are returned.

Parameters:

  • String groupId (required):

  • String userId (required):

  • String getCalendarItemTypeId (required):

  • int startDate (required):

  • int endDate (required):

  • String hcpId (required):

  • int limit:

Implementation

Future<List<int>?> getAvailabilitiesByPeriodAndCalendarItemTypeId(String groupId, String userId, String getCalendarItemTypeId, int startDate, int endDate, String hcpId, { int? limit, }) async {
  final response = await getAvailabilitiesByPeriodAndCalendarItemTypeIdWithHttpInfo(groupId, userId, getCalendarItemTypeId, startDate, endDate, hcpId,  limit: limit, );
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException.withRequestId(response.statusCode, await _decodeBodyBytes(response), response.headers["x-request-id"], response.request?.url.toString());
  }
  // When a remote server returns no body with a status of 204, we shall not decode it.
  // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  // FormatException when trying to decode an empty string.
  if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
    final responseBody = await _decodeBodyBytes(response);
    return (await apiClient.deserializeAsync(responseBody, 'List<int>') as List)
      .cast<int>()
      .toList();

  }
  return null;
}