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 'dialoguewise'
Before we can call the API, we need to prepare the payload.
let request = {
slug: '[Your Slug]',
accessToken: '[Your Access Token]'
};
Now, all you need to do is to call the API using this payload
let dialogueWiseService = new DialogueWiseService();
let res = await dialogueWiseService.getContents(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.