@vara/api-sdk v1.0.4
VARA JavaScript SDK
The VARA JavaScript SDK provides easy access to the VARA APIs from a JavaScript based client.
Installing
Install the required packages
npm install
Usage
The following scripts can be executed to perform actions such as building the SDK, and generating SDK documentation.
Compiling the JavaScript SDK
The following can be executed to compile SDKs for both web and server targets.
npm run build
This will generate usable SDKs to the build\
directory. The web version would contain both uncompressed and minified versions.
Compiling SDK Documentation
The following can be executed to compile documentation relating to SDK functionality.
npm run build:docs
This will generate JsDocs documentation to the out\
directory.
Samples
There are example usage in the example
directory.
Simple HTML & JS Client
This is a basic HTML and JavaScript client that utilizes the web version of the SDK (api.web.js
, api.web.min.js
).
This sample consists of a simple web page with a Load Users button. When clicked, a list of available users on the VARA platform will be displayed.
Configuring Sample
This sample needs to be configured by entering the application ID, client key in the examples\simple-client\js\scripts.js
file.
Running Sample
This sample can be executed by navigating to the root directory of the sample, and then executing the default npm start script.
cd example
cd sample-client
npm start
Node Client
This is a basic NodeJS client example that utilizes the server version of the SDK (api.js
).
Configuring Sample
This sample needs to be configured by entering the application ID, client key / master key in the examples\node_client.js
file.
Running Sample
This sample can be executed by running the node_client.js
file using node.
node example\node_client.js