updateShare method

Future<DynamiteResponse<ShareapiUpdateShareResponseApplicationJson, void>> updateShare({
  1. required String id,
  2. int? permissions,
  3. String? password,
  4. String? sendPasswordByTalk,
  5. String? publicUpload,
  6. String? expireDate,
  7. String? note,
  8. String? label,
  9. String? hideDownload,
  10. String? attributes,
  11. bool? oCSAPIRequest,
})

Update a share.

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:

  • permissions New permissions.
  • password New password.
  • sendPasswordByTalk New condition if the password should be send over Talk.
  • publicUpload New condition if public uploading is allowed.
  • expireDate New expiry date.
  • note New note.
  • label New label.
  • hideDownload New condition if the download should be hidden.
  • attributes New additional attributes.
  • id ID of the share.
  • oCSAPIRequest Required to be true for the API request to pass. Defaults to true.

Status codes:

  • 200: Share updated successfully
  • 400: Share could not be updated because the requested changes are invalid
  • 403: Missing permissions to update the share
  • 404: Share not found

See:

Implementation

Future<_i1.DynamiteResponse<ShareapiUpdateShareResponseApplicationJson, void>> updateShare({
  required String id,
  int? permissions,
  String? password,
  String? sendPasswordByTalk,
  String? publicUpload,
  String? expireDate,
  String? note,
  String? label,
  String? hideDownload,
  String? attributes,
  bool? oCSAPIRequest,
}) async {
  final _request = $updateShare_Request(
    id: id,
    permissions: permissions,
    password: password,
    sendPasswordByTalk: sendPasswordByTalk,
    publicUpload: publicUpload,
    expireDate: expireDate,
    note: note,
    label: label,
    hideDownload: hideDownload,
    attributes: attributes,
    oCSAPIRequest: oCSAPIRequest,
  );
  final _response = await _rootClient.httpClient.send(_request);

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