getCollectionsByResource method
Future<DynamiteResponse<CollaborationResourcesGetCollectionsByResourceResponseApplicationJson, void> >
getCollectionsByResource({})
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 totrue
.
Status codes:
- 200: Collections returned
- 404: Resource not accessible
See:
- $getCollectionsByResource_Request for the request send by this method.
- $getCollectionsByResource_Serializer for a converter to parse the
Response
from an executed request.
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);
}