Shotty API helper — JS
$ npm i shotty-api --save
Require and initialize:
const shotty = 'shotty.local' 'your-secret-key';
allItems is an array in which shotty object holds all actual items of the
id is required.
versionId are optional.
All three functions return promises.
type can be any of the available types except
Object schemes are here.
type— the type of uploading file, possible types:
file— path to the file
data— file description fields
See example for versions. More examples are coming soon.
Feeds and one-time requests
const shotty = 'shotty.local' 'your-secret-key';shotty;
Writing with promises
const timeout = ;shotty;
// don't forget to wrap promises with try/catch blocksconst timeout = ;shotty;