Skip to main content

Hi there,

retrieving the club events from the api-endpoint /clubs/:id/group_events shows only the first date in the upcoming_occurences property even if there is a weekly or monthly interval set. Even if this date is in the past what for sure is no upcoming date :)

This seems to have changed in the meantime as it worked before. Back then the upcoming_occurences array has been populated with future dates.

Has anybody experienced the same behavior?

 

Cheers,
Tobi

Bump! would be helpful to know if you found a work around, I can see days_of_week and frequency as part of the payload when editing an event but there aren’t part of the response back...


@calvincastle Unfortunately the only workaround i found is to make an extra request to retrieve the event details from /group_events/:id … But even there the upcoming_occurrences array will contain only item with the next upcoming date. There used to be some more entries before the change.

You can check the level of detail in the resource_state. An event has resource_state 2 if requested via /clubs/:id/group_events and level 3 at /group_events/:id. With resource_state 2 the upcoming_occurences contain the first date the event has taken place … 


@calvincastle Unfortunately the only workaround i found is to make an extra request to retrieve the event details from /group_events/:id … But even there the upcoming_occurrences array will contain only item with the next upcoming date. There used to be some more entries before the change.

You can check the level of detail in the resource_state. An event has resource_state 2 if requested via /clubs/:id/group_events and level 3 at /group_events/:id. With resource_state 2 the upcoming_occurences contain the first date the event has taken place … 

Thanks for the fast reply, it’s a bit rubbish on Strava’s end as I’ll now need to play a guessing game to figure out if it’s a one time event or not (or just make x2 requests per event and hit my limit faster).

How are you making the request to /group_events/:id via the API as I get a 404?


Exactly. This bumps your request count closer to the limit very soon. For that i decided to flag the imported events after the first detail request if they have a time interval or not. Those which don’t have one not are ignored in subsequent imports.

How are you making the request to /group_events/:id via the API as I get a 404?

Have you replaced :id with the id of the event (e.g. https://www.strava.com/api/v3/group_events/123456789)? If you get a 404 anyway the event may has been deleted in the meantime …


Exactly. This bumps your request count closer to the limit very soon. For that i decided to flag the imported events after the first detail request if they have a time interval or not. Those which don’t have one not are ignored in subsequent imports.

How are you making the request to /group_events/:id via the API as I get a 404?

Have you replaced :id with the id of the event (e.g. https://www.strava.com/api/v3/group_events/123456789)? If you get a 404 anyway the event may has been deleted in the meantime …

Yeah not ideal for API limits (I could scrape but unsure of the legality), the reason I was getting the 404 was that I presumed the endpoint was /clubs/:id/group_events/:id (as this feels logical for API conventions). Thanks again for the reply!