jsonbin.io v3
Zero dependencies NodeJs Api forInstall
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