Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RecentAchievements of API_GetUserSummary.php returns all achievements and number of recent achievements not working #1615

Closed
DFelten opened this issue Jun 17, 2023 · 1 comment · Fixed by #1636

Comments

@DFelten
Copy link

DFelten commented Jun 17, 2023

Describe the bug

The RecentAchievements field of the endpoint API_GetUserSummary.php returns a list of recently played games including all achievements. Both unlocked and not unlocked achievements appear. Here also appear the games where I have no Achievements yet.

In addition, the parameter a seems to be ignored. At least I get significantly more Achievements back.

Is this the way it is supposed to be?

To Reproduce
Steps to reproduce the behavior:

  1. API call: API_GetUserSummary.php?y={{key}}&u={{user}}

Expected behavior

In the list of recent achievements, only those should appear that I actually received recently. Also, only as many as I specify via the parameter.

@Jamiras
Copy link
Member

Jamiras commented Jun 30, 2023

The a parameter is only filtering unlocked achievements.

For example, if you played three games:

  • Game 1: Unlocked 2/15 achievements
  • Game 2: Unlocked 0/10 achievements
  • Game 3: Unlocked 7/12 achievements

When you call the API and ask for 3 achievements, you would get 3 of the 7 unlocked achievements from game 3, but all 5 of the locked ones. You'd also get all 10 of the locked achievements for game 2, and all 13 of the locked achievements for game 1.

If you're just looking for recent unlocks, you should use the API_GetUserRecentAchievements interface. It's a much lighter API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants