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:
objectType
Type of the object.objectId
ID of the object.metaData
Additional metadata. Defaults to''
.actorDisplayName
Guest name. Defaults to''
.referenceId
Reference ID. Defaults to''
.apiVersion
Defaults tov1
.token
oCSAPIRequest
Required 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 DynamiteRawResponse that can be serialized.
Implementation
Future<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;
}