@leena-ai/sdk
ns plugin add @leena-ai/sdk
Usage
XML + Typescript
-
Add
xmlns
to Page element -
Use the name of
xmlns
as a selector -
Leena SDK exports the component named
Sdk
which can be used to open a Leena botExample:
<Page xmlns="http://schemas.nativescript.org/tns.xsd" xmlns:ln="@leena-ai/sdk" navigatingTo="navigatingTo" class="page"> <!-- Here Goes your Header and any other UI --> <GridLayout> <ln:Sdk clientId="{{ clientId }}" token="changeme"></ln:Sdk> </GridLayout> </Page>
Nativescript Angular
- Import
NativeScriptSdkModule
in the module you want to load Leena App - Leena SDK exports a component named
Sdk
that can used like any other Angular component
Note: Use a <GridLayout>
instead of <StackLayout>
if the UI does not load
API
Property | Default | Required | Description |
---|---|---|---|
clientId | - | Yes | The client ID for Leena bot. |
token | - | Yes | The app token which will authenticate the user with Leena App |
License
Apache License Version 2.0