1.5.3 • Published 1 year ago

jsonbank v1.5.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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

1 year ago

1.5.2

2 years ago

1.5.1

2 years ago

1.4.5

2 years ago

1.4.4

2 years ago

1.4.2

2 years ago

1.5.0

2 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.1

3 years ago

1.0.2

4 years ago

1.1.0

3 years ago

1.0.1

4 years ago

1.0.0

4 years ago

1.1.2

3 years ago

1.0.3

3 years ago

0.0.3

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago