1.1.5 • Published 2 years ago

@leena-ai/nativescript-sdk v1.1.5

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
2 years ago

@leena-ai/nativescript-sdk

ns plugin add @leena-ai/nativescript-sdk

Usage

XML + Typescript

  1. Add xmlns to Page element
  2. Use the name of xmlns as a selector
  3. Leena SDK exports the component named Sdk which can be used to open a Leena bot

    Example:

    <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

  1. Import NativeScriptSdkModule in the module you want to load Leena App
  2. Leena SDK exports a component named Sdk that can used like any other Angular component
  3. You can also provide a pageTransition if the sdk is opened as a new route with it's own component

home.component.html

<Button text="Leena AI" [nsRouterLink]="['/leena']" pageTransition="slideLeft" ></Button>

leena.component.html

<GridLayout>
  <Sdk clientId="clientId" token="changeme"></Sdk>
</GridLayout>

Note: Use a <GridLayout> instead of <StackLayout> if the UI does not load

API

PropertyDefaultRequiredDescription
clientId-YesThe client ID for Leena bot.
token-YesThe app token which will authenticate the user with Leena App

License

Apache License Version 2.0

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.9

2 years ago

0.0.1

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago