@ainize/ainize-js-sdk

    2.4.0 • Public • Published

    Ainize Run JavaScript SDK

    This SDK aims to help to use Ainize APIs.

    Requirements

    In order to use this SDK, you'll need the following tools:

    Node installation will include NPM, which is responsible for the dependencies management.

    Installation

    Node.js

    $ npm install @ainize/ainize-js-sdk

    const Ainize = require('@ainize/ainize-js-sdk').default

    Local Build

    OSX and Ubuntu (tested on OSX 10.14.6 and Ubuntu 18.04.3 LTS)

    $ sudo apt install git
    $ sudo apt-get update
    $ sudo apt-get install -y nodejs
    $ sudo apt-get install -y npm
    
    $ git clone git@bitbucket.org/comcomai/ainize-sdk.git
    $ cd ainize-sdk/
    $ git checkout develop
    $ npm install

    Uses /ainize-sdk/dist/ainize-sdk.js

    Debian (tested on Debian 9.9)

    $ sudo apt install git
    $ sudo apt-get update
    $ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
    $ sudo apt-get install -y nodejs
    
    $ git clone git@bitbucket.org/comcomai/ainize-sdk.git
    $ cd ainize-sdk/
    $ git checkout develop
    $ npm install

    Uses /ainize-sdk/dist/ainize-sdk.js

    gulp babel

    Additional build for Web-SDK (tested on Chrome browser)

    $ npm install webpack-cli -g
    $ gulp build

    Uses /ainize-sdk/dist/bundle.js

    Usage

    const AinizeRun = require('@ainize/ainize-js-sdk')
    const ainizeRun = new AinizeRun({})
    const idToken = 'AINIZE-FIREBASE-ID-TOKEN'
    
    ainizeRun.api.getList(idToken)
        .then(response => {
            console.log(response)
        })
        .catch(e => {
            console.log(e.toString())
        })

    Publish NPM Package

    publish pre-release version (dev/staging)

    npm run publish-pre-release-version

    API Documents

    Ainize API Documentation

    Install

    npm i @ainize/ainize-js-sdk

    DownloadsWeekly Downloads

    11

    Version

    2.4.0

    License

    MPL-2.0

    Unpacked Size

    59.5 kB

    Total Files

    4

    Last publish

    Collaborators

    • tobark
    • hanjeong_comcom
    • dev_ainetwork
    • platfowner
    • laeyoung_comcom
    • liay
    • minho-comcom-ai
    • minsulee