1.1.0 • Published 1 month ago

greenbiisdk v1.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
1 month ago

greenbiisdk

The official Javascript SDK for the Greenbii Platform. This SDK tightly integrates into the frontend of any application to be listed on the Greenbii ERP platform.

Development

Developers will need an API key to be generated after submitting their app to be listed on the Greenbii Platform. Visit https://developer.greenbii.com/ for more info.

Integrating

Run npm install greenbiisdk -s in your project folder.

Usage

    //import the sdk into your project
    import {greenbiisdk} from 'greenbiisdk';

    //create an instance of the SDK
    const greenbii = new greenbiisdk();

    //initialize the sdk with your API token and the request_access_token
    //received in the query parameter of your app url
    const param = new URLSearchParams(window.location.search);
    greenbii.init(
        {access_token: params.get("request_access_token"), 
        api_key: <your_api_key>}
    ).then(status=>{
        if(status === true) {
            //do domething here
            //gets the currently logged in user
            greenbii.getCurrentUser();
            //get the business details of the currently logged in user
            greenbii.getBusinessDetails()
        }
        else {
            //this will log the reason why the request failed!
            console.log(greenbii.getStatusMessage())
        }
    })

Fixes

Fixed type error in the response object received from the server on initialization.

Need help?

Visit https://developer.greenbii.com for complete documentation.

1.1.0

1 month ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

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