Skip to content

lupuionut/banggood-aff-api-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 

Repository files navigation

banggood-aff-api-js

Banggood affiliate API in Nodejs

Description

This implementation follows the docs from this link: https://imgs3.banggood.com/affiliate/banggood-affiliate-apidoc-v1.2.2.pdf

Usage

import { BanggoodAPI as api } from './api.js';
let BanggoodAPI = new api();

// load the stored token
BanggoodAPI.loadAccessToken().then((api) => {

    // validate the token
    api.accessTokenValid().then(async (valid) => {

        // if token is invalid/is not stored, try to get a new one
        if (valid == false) {
            valid = await api.getAccessToken();
        }

        // if we succeed, perform the rest operations
        if (valid) {
            console.log(api);
        }
    });
});

About

Banggood affiliate API in Nodejs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published