![Node version](https://img.shields.io/badge/node-%3E%3D%2012.0.0-brightgreen)
![npm version](https://img.shields.io/npm/v/@hubs101/js-api-skd-client)

![npm](https://img.shields.io/npm/dm/@hubs101/js-api-skd-client)
![npm total downloads](https://img.shields.io/npm/dt/@hubs101/js-api-skd-client)
![npm bundle size](https://packagephobia.com/badge?p=@hubs101/js-api-skd-client)

![License](https://img.shields.io/npm/l/@hubs101/js-api-skd-client)
![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)
![Snyk Vulnerabilities](https://img.shields.io/snyk/vulnerabilities/npm/@hubs101/js-api-skd-client)
![Minified size](https://img.shields.io/bundlephobia/min/@hubs101/js-api-skd-client)
![React](https://img.shields.io/badge/React-%5E18.2.0-blue)
![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)

![GitHub dependency status](https://img.shields.io/github/dependency-status/We-Conect/hubs101-js-api-skd-client/main)
![Code Climate maintainability](https://img.shields.io/codeclimate/maintainability/We-Conect/hubs101-js-api-skd-client)
![Build Status](https://travis-ci.com/We-Conect/hubs101-js-api-skd-client.svg?branch=main)
![GitHub last commit](https://img.shields.io/github/last-commit/We-Conect/hubs101-js-api-skd-client)

## Install Size

Check out the package's install size on [Packagephobia](https://packagephobia.com/result?p=js-api-skd-client).

## API Doc

[API Documentation](https://github.com/We-Conect/event-app-api/blob/main/src/README.md)

## Using BaseAPI, stateless

Used before initWithToken
`BaseAPI.login(basePath, username, password)`

Accessing API via stateless interface:
`BaseAPI.fetchAttendees(basePath, token, eventID)`

## Using EventAPIProvider

1. Wrap app with Provider:
   `import { EventAPIProvider } from '@hubs101/js-api-skd-client';`
2. Access api via hook:
   ` const { fetchAttendees } = useAPIContext();`
   \*\*First init or initWithToken needs to be called in order to have authentication setup.

## Creating new release

1. Commit al changes to git
2. Prepare build: `npm run build`
3. Create new patch version run: `npm version patch`
4. Publish package to NPM: `npm publish`

All in one publish alternative run: `npm run new-version`
