Skip to content

Commit

Permalink
Version 0.20.0 (#351)
Browse files Browse the repository at this point in the history
* Migrate to yarn, update README.md

* 0.20.0

* npm publish

---------

Co-authored-by: Stas Doskalenko <stas.doskalenko@hover.to>
  • Loading branch information
StasDoskalenko and StasDoskalenkoHover authored Nov 14, 2023
1 parent 056530f commit 5d692e1
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 19,544 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
on:
push:
branches: main

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "18"
- run: npm ci
- run: npm test
- uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,30 @@ async function fetchData() {
}
]
```
Getting aggregated heart rate samples:

```typescript
/**
* Query for getting aggregated heart rate samples.
* @param options
* @param inLocalTimeZone
*/
getAggregatedHeartRateSamples: (
options: StartAndEndDate & Partial<BucketOptions>,
inLocalTimeZone: boolean
) => Promise<AggregatedHeartRateResponse[]>;
```
Response:
```typescript
[{
startDate: string,
endDate: string,
min: number,
average: number,
max: number,
day: Day,
}]
```

#### 8. Get all activities
<br/>Require scopes: `Scopes.FITNESS_ACTIVITY_READ` & `Scopes.FITNESS_LOCATION_READ`
Expand Down
5 changes: 5 additions & 0 deletions index.android.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ declare module 'react-native-google-fit' {
options: StartAndEndDate & Partial<BucketOptions>
) => Promise<HeartRateResponse[]>;

/**
* Query for getting aggregated heart rate samples.
* @param options
* @param inLocalTimeZone
*/
getAggregatedHeartRateSamples: (
options: StartAndEndDate & Partial<BucketOptions>,
inLocalTimeZone: boolean
Expand Down
Loading

0 comments on commit 5d692e1

Please sign in to comment.