createShare method
Create 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:
pathPath of the share.permissionsPermissions for the share.shareTypeType of the share. Defaults to-1.shareWithThe entity this should be shared with.publicUploadIf public uploading is allowed. Defaults tofalse.passwordPassword for the share. Defaults to''.sendPasswordByTalkSend the password for the share over Talk.expireDateExpiry date of the share. Defaults to''.noteNote for the share. Defaults to''.labelLabel for the share (only used in link and email). Defaults to''.attributesAdditional attributes for the share.oCSAPIRequestRequired to be true for the API request to pass. Defaults totrue.
Status codes:
- 200: Share created
- 400: Unknown share type
- 403: Creating the share is not allowed
- 404: Creating the share failed
See:
- createShareRaw for an experimental operation that returns a DynamiteRawResponse that can be serialized.
Implementation
Future<DynamiteResponse<ShareapiCreateShareResponseApplicationJson, void>> createShare({
String? path,
int? permissions,
int? shareType,
String? shareWith,
String? publicUpload,
String? password,
String? sendPasswordByTalk,
String? expireDate,
String? note,
String? label,
String? attributes,
bool? oCSAPIRequest,
}) async {
final rawResponse = createShareRaw(
path: path,
permissions: permissions,
shareType: shareType,
shareWith: shareWith,
publicUpload: publicUpload,
password: password,
sendPasswordByTalk: sendPasswordByTalk,
expireDate: expireDate,
note: note,
label: label,
attributes: attributes,
oCSAPIRequest: oCSAPIRequest,
);
return rawResponse.future;
}