googleapis / googleapis/google-api-nodejs-client

How to get data of type com.google.activity.summary?

Open
#3,067 0 comments 0 reactions 0 assignees View on GitHub
priority: p3 type: question
Dominant language
TypeScript
Stars
12.2k
Forks
2k
Avg merge
1d 9h
Merged PRs (30d)
24

Description

I found a very useful datatype - com.google.activity.summary, but I cannot figure out how to use it. Link to the docs https://developers.google.com/fit/datatypes/aggregate#rest .
I tried this code:
```
const activitySummary = await fitness.users.dataset.aggregate({
userId: 'me',
requestBody: {
aggregateBy: [
{
dataTypeName: "com.google.activity.summary"
},

],
startTimeMillis: 1663189200000,
endTimeMillis: 1663338945118
}
})
```

Error:
```
code: 400,
errors: [
{
message: 'no default datasource found for: com.google.activity.summary',
domain: 'global',
reason: 'invalidArgument'
}
]
```
Is it even possible to use it with this lib?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.