Colossus-Gaming / retroachievements-layout-manager

34 stars 5 forks source link

Migrate API_GetUserSummary to API_GetUserRecentAchievements #12

Closed wescopeland closed 1 year ago

wescopeland commented 1 year ago

This new endpoint is being added to this week's RAWeb release, likely going out within the next 12 hours.

https://github.com/RetroAchievements/RAWeb/pull/1493

This is a low-overhead alternative to API_GetUserSummary. Frequent calls to API_GetUserSummary is what is causing the recent web API outages and errors that have been observed.

Implementation for the new endpoint here: https://github.com/RetroAchievements/RAWeb/pull/1493/files#diff-4586ebe4fd5749a2527fd586e4c5e287c62c0e55e2c086cbf631b63bfe97a8ba

lrhodes404 commented 1 year ago

I put out a release to only use API_GetUserSummary on initial boot and will only poll API_GetUserRecentlyPlayedGames and API_GetGameInfoAndUserProgress every 30s to detect unlocked achievements. If achievements are unlocked, it will call API_GetUserRankAndScore to update those fields.

I have an update ready to only use API_GetGameInfoAndUserProgress if there are Achievements returned from API_GetUserRecentAchievements within the last minute that belong to the most recently played game and aren't already known as unlocked to the tracker. This should minimize a lot of unnecessary overhead to get the data necessary for a streamer's layout.

lrhodes404 commented 1 year ago

Update was put out yesterday and appears to be stable. Closing this issue as the requested migration has been completed.