achievements-app/psn-api

How to set trophyGroupId for getUserTitles request ?

landscht opened this issue · 2 comments

Hello!

I see in your documentation that for the getUserTitles query you specify "To retrieve trophies from all groups within a title (ie. the full trophy set), then trophyGroupId should be set to 'all'". Based on the answer to this query the percentage shows me the progress on all groups. I would like to know if it is possible to set the trophyGroupId to 'default' so that when we have the progress on the main game.

Thank you!

Hi @landscht ,

Sorry, after triple checking this is actually a documentation mistake on my part. It turns out this kind of querying is unsupported by this particular PSN endpoint. This endpoint can only retrieve the list of summarized user progress. After this list is retrieved, for deep progress, subsequent API calls must be used. The one you're looking for is probably getUserTrophiesEarnedForTitle.

This does usually end up resulting in a lot of calls, especially if the user has a ton of games! For some of my other projects, I built a job queueing system with BullMQ to manage this.

I will update this documentation after work today and leave this issue open until that is done.

Docs updated via #111. I've also included a note about subsequent calls w/ getUserTrophiesEarnedForTitle.