Skip to content
This repository was archived by the owner on Jun 1, 2022. It is now read-only.

envato-archive/market-api-gateway-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

market-api-gateway-js

NPM version build status js-standard-style

JavaScript SDK for Envato marketplace api-gateway

Installation

npm install @envato-marketplace-foundation/market-api-gateway-js

Documentation

For detail documentation, check https://build.envato.com/api

API Overview

Create a new apiGateway instance:

const ApiGateway = require('@envato-marketplace-foundation/market-api-gateway-js')

const apiGateway = new ApiGateway('ACCESS_TOKEN')
// or
const apiGateway = new ApiGateway({
  accessToken: 'ACCESS_TOKEN',
  baseURL: 'new api endpint', // optional
  timeout: 3000 // optional
})

optional options:

  • baseURL String api base url, default to https://api.envato.com
  • timeout Integer request timeout, default to 2000

Each resource is under it's own category as documented on https://build.envato.com/api/ and it return a Promise:

apiGateway.stats.getTotalUsers()
  .then(function (res) {
    console.log('res', res)
  })
  .catch(function (err) {
    console.log('err', err)
  })

Available resources & methods

Development

$ npm install
$ npm test

Publish to npm.

npm publish --access=public

If you want to publish module to npm, check the documentation at Working with scoped packages for more detail.

License

MIT

About

JavaScript SDK for marketplace api-gateway

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •