shareObjectToChat method
Future<DynamiteResponse<ChatShareObjectToChatResponseApplicationJson, ChatChatShareObjectToChatHeaders> >
shareObjectToChat({
Sends a rich-object to the given room.
The author and timestamp are automatically set to the current user/guest and time.
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:
objectTypeType of the object.objectIdID of the object.metaDataAdditional metadata. Defaults to''.actorDisplayNameGuest name. Defaults to''.referenceIdReference ID. Defaults to''.apiVersionDefaults tov1.tokenoCSAPIRequestRequired to be true for the API request to pass. Defaults totrue.
Status codes:
- 201: Object shared successfully
- 400: Sharing object is not possible
- 404: Actor not found
- 413: Message too long
See:
- shareObjectToChatRaw for an experimental operation that returns a
DynamiteRawResponsethat can be serialized.
Implementation
Future<_i1.DynamiteResponse<ChatShareObjectToChatResponseApplicationJson, ChatChatShareObjectToChatHeaders>>
shareObjectToChat({
required String objectType,
required String objectId,
required String token,
String? metaData,
String? actorDisplayName,
String? referenceId,
ChatShareObjectToChatApiVersion? apiVersion,
bool? oCSAPIRequest,
}) async {
final rawResponse = shareObjectToChatRaw(
objectType: objectType,
objectId: objectId,
token: token,
metaData: metaData,
actorDisplayName: actorDisplayName,
referenceId: referenceId,
apiVersion: apiVersion,
oCSAPIRequest: oCSAPIRequest,
);
return rawResponse.future;
}