CommunityAppLogClient
CommunityAppLogClient:
object
Type declaration
create()
Parameters
| Parameter | Type |
|---|---|
request | CommunityAppLogCreateRequest |
Returns
Promise<CommunityAppLogCreateResponse>
Example
import {
CommunityAppLogType,
CommunityAppLogCreateRequest,
CommunityAppLogCreateResponse,
UnknownGuid,
rootServer,
} from "@rootsdk/server-bot";
export async function createExample(
communityAppLogType: CommunityAppLogType,
message: string
): Promise<CommunityAppLogCreateResponse> {
try {
// Set up the request
const request: CommunityAppLogCreateRequest = {
communityAppLogType: communityAppLogType,
message: message
};
// Call the API
const result: CommunityAppLogCreateResponse =
await rootServer.dataStore.logs.community.create(request);
return result;
} catch (error) {
// Detect error
throw error;
}
}