fizz-client

1.2.1 • Public • Published

Fizz Javascript Client

Fizz is a platform aimed at improving user acquisition, retention and conversion. Fizz provides different services that work together to achieve these goals. These services include chat, moderation, analytics, etc

Getting Started

NPM

npm install fizz-client --save

Create an instance of the FizzClient using the appropriate factory function:

let client = await FizzClient.create(APP_ID, APP_SECRET, "userA", "en", null);

Interact with the chat service using the 'chat' property of the client. For example:

await client.chat.publishMessage(CHANNEL_ID, "userA", "hello from js!", null, true, true, true);

Interact with the moderation service using the 'moderation' property of the client. For example:

let filteredTexts = await client.moderation.moderateTexts(texts);
Note: All APIs return promises which allows you to use async/await if you prefer.

To log messages on the analytics service.

let messageSent = await client.analytics.messageSent(USER_ID, "Hello World", CHANNEL_ID, "testnick")

To log product purchased on the analytics service.

let productPurchased = await client.analytics.productPurchased(USER_ID, "pr01", 100, "usd");

Documentation

For more details (and an API reference) see the Fizz documentation;

Package Sidebar

Install

npm i fizz-client

Homepage

fizz.io

Weekly Downloads

8

Version

1.2.1

License

see LICENSE.md

Unpacked Size

389 kB

Total Files

4

Last publish

Collaborators

  • fizzio