1.5.3 • Published 3 months ago
jsonbank v1.5.3
JsonBank NodeJs SDK
The official repository for jsonbank.io Javascript SDK.
STAGE: (RFC)
Installation
npm i jsonbank
# OR YARN
yarn add jsonbank
Usage
const {JsonBank} = require("jsonbank")
// Initialize with Api keys.
const jsb = new JsonBank({
keys: {
pub: 'JSB_PUBLIC_KEY',
prv: 'JSB_PRIVATE_KEY',
}
});
// Get json content of a public file.
await jsb.getContent("public/my.json");
// Get json content of a private file
await jsb.getOwnContent("private/my.json");
// Get a json file from github.
await jsb.getGithubContent("github_username/repo/path/to/my.json");
// Update content of a json file.
await jsb.updateContent('private/numbers.json', {
// new data...
})
Testing
Create an .env file in the root of the project and add the following variables
JSB_HOST="https://api.jsonbank.io"
JSB_TIMEOUT=30000
JSB_PUBLIC_KEY="your public key"
JSB_PRIVATE_KEY="your private key"
Then run the test command below.
npm run test
1.5.3
3 months ago
1.5.2
6 months ago
1.5.1
6 months ago
1.4.5
1 year ago
1.4.4
1 year ago
1.4.2
1 year ago
1.5.0
1 year ago
1.4.1
2 years ago
1.4.0
2 years ago
1.3.1
2 years ago
1.3.0
2 years ago
1.2.0
2 years ago
1.1.7
2 years ago
1.1.6
2 years ago
1.1.5
2 years ago
1.1.4
2 years ago
1.1.3
2 years ago
1.1.1
2 years ago
1.0.2
2 years ago
1.1.0
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago
1.1.2
2 years ago
1.0.3
2 years ago
0.0.3
3 years ago
0.0.5
3 years ago
0.0.4
3 years ago
0.0.2
3 years ago
0.0.1
3 years ago