rook-core
v0.7.4
Published
RookMotion Core is a React Hooks library that contains the **main calls to RookMotion backend** to get easy the integration with **RookMotion services**, in this package you could find a list of modules in order to do the calls, each calls are grouped in
Downloads
9
Readme
RookMotion Core
RookMotion Core is a React Hooks library that contains the main calls to RookMotion backend to get easy the integration with RookMotion services, in this package you could find a list of modules in order to do the calls, each calls are grouped in modules this modules will be described next.
Installation
npm i rook-core
or
yarn add rook-core
This package needs a database that should be install and configure, in order to do that please do this installation. (Follow only the installation tutorial)
Configuration
In order to get active this package you need to set a provider in the highest position of your components tree, you need to use RookWrapper component in order to pass properties into your application necessary to start this package.
import { RookWrapper } from 'rook-core';
...
<RookWrapper
config={{
authorization: 'YOUR-BEARER-TOKEN',
tokenLevel: 'YOUR-CLIENT-TOKEN',
url: 'BASE URL SANDBOX OR PRODUCTION',
}}>
<YOUR-COMPONENTS />
</RookWrapper>
Package Content
useRookPreference()
- Manage the last sensor used by the useruseRookSensor()
- Manage the sensors that a user haveuseRookSummaries()
- Get the summaries of a training and the rewards obtened by a useruseRookTrainings()
- Manage the data of a traininguseRookUser()
- Manage the profile of the user