Get contents

Once the package is installed, you can easily retrieve the contents of a Dialogue and display it on your app. You will need to import the service to 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.