Get contents

Once the package is installed, you will need to import it in your required JS file.

import { DialogueWiseService } from 'dialogue-wise';

Before we can call the API, we need to prepare the payload.

  let request = {
    slug: '[Your Slug]',
    apiKey: '[Your API Key]',
    emailHash: '[Your Email Hash]',
  };

Now, all you need to do is to call the API using this payload

let dialogueWiseService = new DialogueWiseService();
let res = await dialogueWiseService.getDialogue(request);

Your content is now available in the res object which you can use in your app. You can checkout our sample app on our Github.