google-api-nodejs-client
google-api-nodejs-client copied to clipboard
How to get data of type com.google.activity.summary?
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?