GithubHelp home page GithubHelp logo

lightelligence-io / browser-sdk Goto Github PK

View Code? Open in Web Editor NEW
5.0 9.0 5.0 5.23 MB

Provides tools to make webapp development with lightelligence faster and easier.

Home Page: https://lightelligence-io.github.io/browser-sdk

License: MIT License

JavaScript 88.44% CSS 11.40% Shell 0.16%

browser-sdk's Introduction

logo

BrowserSDK

Build Status Code Coverage Dependencies npm (scoped)

The Lightelligence API JavaScript Client for the Browser

Installation

npm install @lightelligence/browser-sdk

Features

The BrowserSDK allows you to access most of the Lightelligence API end-points and manages the user authentication flow for your client side application.

Usage

In order to authenticate with the BrowserSDK you will need to create an application via our Lightelligence portal and obtain a public client ID.

import BrowserSDK, { Device } from '@lightelligence/browser-sdk';

const browserSDK = new BrowserSDK({
  environment: 'prod', // Target enviroment (either `dev`, `preview` or `prod`)
  clientId: '', // The public client ID of the application your created in our [Lightelligence portal](https://portal.lightelligence.io/developer)
});

browserSDK.getCurrentUser().then(user => {

  if ( !user ) { return browserSDK.login(); }
  
  // Will print all devices of the tenant
  Device.getDevices().then( devices => console.log( devices ) );
  
} )

Check out the API reference to see the full documentation.

License

MIT

browser-sdk's People

Contributors

blumendorf avatar drinchev avatar frabbit avatar jkettmann avatar jonathanstoye avatar smnielsen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.