POSTS
- 2 minutes readNativeScript NativeScript is an open-source framework to develop cross-platform mobile applications with JavaScript, TypeScript, Angular or Vue.js.
In this post, we’ll see how you can use our Headless CMS to power the contents of your apps. This means you don’t need any database or custom solutions to manage content. We will use TypeScript as an example to demonstrate how you can integrate Dialoguewise into your apps.
Let’s get started by installing the NPM package:
npm i dialogue-wise
The next step is to import the service.
import { DialogueWiseService, DialogueWiseRequest } from 'dialogue-wise';
We now need to prepare the payload to call the service.
const request: DialogueWiseRequest = {
slug: '[Your slug]',
apiKey: '[Your API key]',
emailHash: '[Email Hash]',
};
Now all we need to do is pass the payload and get your content.
const dialogueWiseService = new DialogueWiseService();
const response = await dialogueWiseService.getDialogue(request);
The response
will now contain the content that you can display on your app.
As you can see it’s pretty much straightforward. Some of the advantages of using our platform are:
-
Location / Device based content delivery - Allows you to enhance the user experience by automatically delivering content based on the user’s location or device.
-
Custom scripting - Add custom scripts to further personalize the user experience based on your predetermined scenarios.
-
Webhooks - Get real-time notifications whenever your content gets changed. This allows you to do things like, trigger a build or fetch updated content.
Also, please have a look at our Github repo to see examples using other frameworks like Angular and Vue.js