feat(strava): add action to create totals and stats report

This commit is contained in:
Ali BARIN
2023-04-06 19:47:09 +00:00
parent 5b881db19f
commit 53624a6379
3 changed files with 20 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
import defineAction from '../../../../helpers/define-action';
export default defineAction({
name: 'Create totals and stats report',
key: 'createTotalsAndStatsReport',
description: 'Create a report with recent, year to date, and all time stats of your activities',
async run($) {
const { data } = await $.http.get(`/v3/athletes/${$.auth.data.athleteId}/stats`);
$.setActionItem({
raw: data,
});
},
});