verifymycontent-moderation
v1.1.7
Published
## Installation
Downloads
1,906
Readme
VerifyMyContent Moderation Node SDK
Installation
$ npm install verifymycontent-moderation --save
// or
$ yarn add verifymycontent-moderation
Usage
import { ModerationClient } from 'verifymycontent-moderation'
;(async function () {
const Client = new ModerationClient({
apiKey: 'YOUR_API_KEY',
apiSecret: 'YOUR_API_SECRET',
// useSandbox: true,
})
const moderation = await Client.createModeration({
content: {
id: 'YOUR-CONTENT-ID',
url: 'https://...',
type: 'video',
title: 'My video',
description: 'My description',
},
customer: {
id: 'YOUR-CUSTOMER-ID',
email: '[email protected]',
// phone: '+1-555-555-5555', // (optional)
},
webhook: 'https://...',
})
console.log(
`Moderation created: ${moderation.id} - Current status: ${moderation.status}`
)
setTimeout(() => {
console.log(`Getting moderation ${moderation.id} after 5 seconds`)
Client.getModeration(moderation.id).then((moderation) => {
console.log(
`Moderation ${moderation.id} after 5 seconds - Current status: ${moderation.status}`
)
})
}, 5000)
})()