getCollectionsByResource method

Future<DynamiteResponse<CollaborationResourcesGetCollectionsByResourceResponseApplicationJson, void>> getCollectionsByResource({
  1. required String resourceType,
  2. required String resourceId,
  3. bool? oCSAPIRequest,
})

Get collections by resource.

Returns a Future containing a DynamiteResponse with the status code, deserialized body and headers. Throws a DynamiteApiException if the API call does not return an expected status code.

Parameters:

  • resourceType Type of the resource.
  • resourceId ID of the resource.
  • oCSAPIRequest Required to be true for the API request to pass. Defaults to true.

Status codes:

  • 200: Collections returned
  • 404: Resource not accessible

See:

Implementation

Future<_i1.DynamiteResponse<CollaborationResourcesGetCollectionsByResourceResponseApplicationJson, void>>
    getCollectionsByResource({
  required String resourceType,
  required String resourceId,
  bool? oCSAPIRequest,
}) async {
  final _request = $getCollectionsByResource_Request(
    resourceType: resourceType,
    resourceId: resourceId,
    oCSAPIRequest: oCSAPIRequest,
  );
  final _response = await _rootClient.httpClient.send(_request);

  final _serializer = $getCollectionsByResource_Serializer();
  final _rawResponse =
      await _i1.ResponseConverter<CollaborationResourcesGetCollectionsByResourceResponseApplicationJson, void>(
    _serializer,
  ).convert(_response);
  return _i1.DynamiteResponse.fromRawResponse(_rawResponse);
}