Skip to content

Question: Is it possible to update multiple activities with one API request?  #134

@bigandy

Description

@bigandy

Situation:
I want to update multiple activities with strava.activities.update is it possible or do in one go.

Or would I have to do it once per activity id?

otherwise would this be the best approach?

const selectedActivities = [{id: 1}, {id:2}, {id:3}];

await selectedIds.reduce((promiseChain, currentActivity) => {
    return promiseChain.then(async () => {
        await strava.activities.update({ id: currentActivity.id, name: "has been updated" });
    });
}, Promise.resolve());

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions