Skip to content

Latest commit

 

History

History
29 lines (24 loc) · 607 Bytes

USAGE.md

File metadata and controls

29 lines (24 loc) · 607 Bytes
import { ModerationApi } from "@moderation-api/sdk";

const moderationApi = new ModerationApi({
  secretKey: process.env["MODAPI_SECRET_KEY"] ?? "",
});

async function run() {
  const result = await moderationApi.content.submit({
    content: {
      type: "text",
      text: "Hey, check out my profile for a deal!",
    },
    contentId: "message-48213",
    authorId: "user-1092",
    conversationId: "room-general",
    metadata: {
      "platform": "ios",
    },
  });

  console.log(result);
}

run();