sclabjs

0.2.2 • Public • Published

SCLABjs

npm package Build Status Downloads Issues Code Coverage Commitizen Friendly Semantic Release

SCLAB client side javascript NPM Module for integrate with a SITE created by SCLAB Studio

Documentation

Install

npm install sclabjs

Usage

import { Sclab } from 'sclabjs';

// client side
Sclab.init("https://userSiteCode.sclab.io", ()=>{
  // ready

  // login
  Sclab.login('abc@sclab.io', '1234', (result: boolean)=>{
    if(result){
      // move to user page
    }else{
      // login error
    }
  });
});

Client APIs

init(siteURL, apiToken?, callback?)

siteURL

Type: string

Published site url of your SITE.

callback

Type: function

callback function when sclabjs ready to use

login(email, password, callback)

email

Type: string

email address

password

Type: string

user password

callback

Type: function

callback function when login complete

loginWithToken(loginToken, callback)

loginToken

Type: string

loginToken from REST API

callback

Type: function

callback function when login complete

logout(callback)

callback

Type: function

callback function when logout complete

kill()

clear Sclab

Package Sidebar

Install

npm i sclabjs

Weekly Downloads

0

Version

0.2.2

License

MIT

Unpacked Size

14.8 kB

Total Files

7

Last publish

Collaborators

  • sungyongjang