jsonbin-io-api
v2.1.0
Published
Zero dependencies NodeJs Api for jsonbin.io
Downloads
198
Maintainers
Readme
Zero dependencies NodeJs Api for jsonbin.io v3
Install
npm i jsonbin-io-api --save
Using
import {JsonBinIoApi} from 'jsonbin-io-api';
const api = new JsonBinIoApi('your-secret-key');
create bin
api.bins.create({
record: {sample: 'Hello World'},
binName: 'test'
})
.then(console.log);
read bin
api.bins.read({
binId: 'some-bin-id'
})
.then(console.log);
update bin
api.bins.update({
binId: 'some-bin-id',
record: {sample: 'Hello World again!'}
})
.then(console.log);
delete bin
api.bins.delete({
binId: 'some-bin-id'
})
.then(console.log);
More examples
More examples in examples dir