Implements helper functions for making calls to the Nationskollen API.
Package is published using Github Packages and requires authentication to both read and write.
First, create a new Personal token in your Github settings:
Settings > Developer Settings > Personal access tokens
Then click Generate new token.
Select the write:packages and read:packages scopes and click "Generate
token".
Create a new file in your home directory ~/.npmrc containing the following:
//npm.pkg.github.com/:_authToken=<personal access token>
Create .npmrc in your project root (same directory as package.json in sdk)
containing the following:
@nationskollen:registry=https://npm.pkg.github.com/
Install the library:
npm install --save @nationskollen/sdk
Import the API client using:
import { Provider } from '@nationskollen/sdk'
Install dependencies (npm install) in both root and example/.
npm run setup - Installs all dependenciesnpm run dev - Watches for changes to source files and starts react examplenpm run build - Build source filesnpm run watch - Watch source files and rebuild on changesnpm run lint - Lint source code using ESLintnpm run format - Format source code using prettiernpm publish - Published the package to Github PackagesDocumentation is available using typedoc and can be generated using one of the
commands below. Open docs/index.html in your browser to see the documentation.
npm run docs - Generate documentationnpm run docs:watch - Generate documentation and regenerate automatically on changesGenerated using TypeDoc