scb-api
v1.1.0
Published
Node wrapper for SCB Api
Downloads
17
Readme
SCB
Unofficial wrapper for SCB Api
Installation
npm install --save scb-api
Or
git clone https://github.com/chrisrosenlind/scb.git
cd scb
npm install
Documentation
This module gives you an easy way to call SCB's api with a query. It contains the following methods:
setApiName(name)
setLang(lang)
setApiVersion(version)
getRootLevel()
To access the api use call(query)
, or getRootLevel()
to get all data.
For more info, check out SCB's docs: http://www.scb.se/contentassets/79c32c72783a4f67b202ad3189f921b9/api-beskrivning.pdf
Examples
import SCB from 'scb-api'
const scb = new SCB()
// Set language
scb.setLang('en')
// Call api
scb.call('ssd')
.then(response => {
console.log(response)
})
License
MIT
axios: https://github.com/mzabriskie/axios/