Get an item that has been added to a queue
queue().getItem
import { ContentMod } from "@contentmod/sdk"; const contentMod = new ContentMod({ publicKey: "<YOUR_PUBLIC_KEY>", secretKey: "<YOUR_SECRET_KEY>", }); const queueId = "<QUEUE_ID>"; const queue = contentMod.queue(queueId); const itemId = "<ITEM_ID>"; // Add an item to the queue const res = await queue.getItem(itemId); console.log(res);
QueueItemResponse
27fbdc0b-b295-46ce-93f5-81b2fc08a381
text
true
accepted
Hello world
Show Moderation
90
positive
["politics", "sports"]
[{"category": "sexual", "severity": 90}]
{"profanity": true, "totalFlags": 1, "contentRating": "G", "language": "en"}
Hide Suggested Actions
{"reject": true, "review": true}
This is the original text
This is a filtered text
{"requestId": "27fbdc0b-b295-46ce-93f5-81b2fc08a381", "timestamp": "2023-04-05T12:00:00.000Z"}
{"userId": "12345"}
93a08bd10cd367bf83f12ba6590fcaef2f8deec8a47ce4ce88a15c7dda325ffa