This library vs. Whoop Developer Center
The main goal of this library is to generate requests using a user's login information, not done through OAuth2. While robust, Whoop's native API does not allow nearly as much data to be shared through the API, and requires a tedious process of generating and getting an app approved. If you are looking to create something commercial I reccomend using their platform and not this.
π§ Developer note: I have no idea if this is against their terms of service. By using this library, you agree that everything that is done to your account is by your own accord, and WhoopKit's developers do not take any responsibility for anything that may happen to your account. Which is probably nothing. Maybe.
Nothing in this library is stable, tested, or should be considered for use in a production environment. Things will break and change, so use at your own will.
This example will be easiest if you use Bun, but will work with NPM/Yarn/PNPM
First, install the dependencies
Bun: bun install
NPM: npm install
Yarn: yarn install
PNPM: pnpm install
After that, rename the .env.example
file to .env
, and add your email and password for your Whoop account.
Now, run the example:
Bun: bun run examples/index.ts
NPM/Yarn/PNPM: npm run example
Method | Covered? | Notes |
---|---|---|
Login | β | |
Token Refresh | β | |
Logout | β |
Method | Covered? | Notes |
---|---|---|
Get logged in user | β | |
Get user state | β | needs to be renamed to something more logical |
Get achievements | β |
Metric | Covered? | Notes |
---|---|---|
Heart Rate | β | |
Respiratory Rate | β | |
Blood Oxygen | β | |
RHR | β | |
HRV | β | |
Skin Temperature | β |
Metric | Covered? | Notes |
---|---|---|
Average HRV | β | 1 week, 1 month, 6 months |
Average RHR | β | 1 week, 1 month, 6 months |
Average HR | β | 1 week, 1 month, 6 months |
Average Sleep | β | 1 week, 1 month, 6 months |
Stress | π§ | Stress body is incredibly large, need to trim down |
Average Calories | β | 1 week, 1 month, 6 months |
Sleep Consistency | β | |
Sleep Efficiency | β | |
Sleep Hours | β | |
Restorative Sleep (Hours) | β | |
Restorative Sleep (Percent) | β | |
Sleep Debt | β | |
Sleep Needed | β | |
Time in Bed | β |
Method | Covered? | Notes |
---|---|---|
Get recent activities | β | |
Get single activities | β |
Method | Covered? | Notes |
---|---|---|
Get bedtime | β |
Method | Covered? | Notes |
---|---|---|
Get journal | β | |
Get insights | β |
Method | Covered? | Notes |
---|---|---|
Get teams | β | |
Create team | β | |
Join team | β | |
Leave team | β | |
View team | β | |
View team members | β | |
Get team chat | β | |
Send to team chat | β | |
Edit team info | β | |
Get team strain | β | |
Get team recovery | β | |
Get team sleep | β |