0.1.21 • Published 6 years ago

@easyapi/easyapi v0.1.21

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

easyapi-node-sdk

A library to simplify the use of EasyAPI.io JSON Objects.

Installing

Use npm to install the package. If you have Node installed, run the following:

npm install @easyapi/easyapi --save

Usage

EasyAPI Objects

const EasyAPI  = require('@easyapi/easyapi');

const easyapi = EasyAPI('YOUR_API_KEY','YOUR_APP_ID');

easyapi.object.create({ key: 'value' }).then(json => {
  console.log('Response from server in JSON object format:');
  console.log(json);
});

EasyAPI Files

Using Busboy for the file upload

const EasyAPI  = require('@easyapi/easyapi');

const easyapi = EasyAPI('YOUR_API_KEY','YOUR_APP_ID');

var busboy = new Busboy({ headers: req.headers });
busboy.on('finish', function() {
  const filePassedIn = req.files.file;

  easyapi.file.upload(
    filePassedIn
  ).then(json => {
    console.log('Response from server in JSON object format:');
    console.log(json);
  });
});
req.pipe(busboy);
0.1.21

6 years ago

0.1.20

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago