directLink method

Future<DynamiteResponse<Uint8List, void>> directLink({
  1. required String token,
})

Get a direct link preview for a shared file.

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:

  • token Token of the share.

Status codes:

  • 200: Preview returned
  • 400: Getting preview is not possible
  • 403: Getting preview is not allowed
  • 404: Share or preview not found

See:

Implementation

Future<_i1.DynamiteResponse<Uint8List, void>> directLink({required String token}) async {
  final _request = $directLink_Request(
    token: token,
  );
  final _response = await _rootClient.httpClient.send(_request);

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