@peulda/channel-io-sdk
v1.0.5
Published
Unofficial channel.io SDK
Downloads
365
Readme
@peulda/channel-io-sdk
Unofficial channel.io SDK for npm
Usage
loadChannel (Recommended)
import { loadChannel } from '@peulda/channel-io-sdk'
// with async-await
async function main() {
const channel = loadChannel()
await channel.boot({
pluginKey: 'YOUR_PLUGIN_KEY',
})
await channel.updateUser(userInfo)
}
// with Promise
const channel = loadChannel()
channel
.boot({
pluginKey: 'YOUR_PLUGIN_KEY',
})
.then(() => {
// ...
})
loadSDK
import { loadSDK } from '@peulda/channel-io-sdk'
loadSDK()
window.ChannelIO('boot', {
pluginKey: 'YOUR_PLUGIN_KEY',
})
LICENSE
Disclaimer: This is not an officially supported Channel.io product.