updateShare method
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 totrue
.
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:
- $updateShare_Request for the request send by this method.
- $updateShare_Serializer for a converter to parse the
Response
from an executed request.
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);
}