Closed leandroSalesCotrim closed 1 month ago
@leandroSalesCotrim there's no way to do this because the API doesn't report the Collection as individual games. Correct me if I'm wrong but neither the console, nor the PS App show this as separate games, do they?
i understand, but in PS4 (probably ps5 and ps app too) i can see exactly the same list retrieved in my profile, but when i click in a game that is a bundle/collection, it bring me the trophy list of all games from the bundle, it seems that only don't bring me the games that i didn't started from collection, so it doesn't show in the bundle list. I thought this information was in API too, but if doesn't, it should be something internal data from sony that's not in the api or part from their algorithm
In that case you're probably looking for titles, rather than games. The API has 2 endpoints, trophyTitles
and games
.
https://m.np.playstation.com/api/trophy/v1/users/6462910331343535058/trophyTitles
this should spit individual trophy lists while this https://m.np.playstation.net/api/gamelist/v2/users/6462910331343535058/titles?limit=300&offset=0
will give you the bundle, most likely.
The mapping will have to be handled by you though, as I'm not aware of the API providing this. It should be fairly trivial though.
I've done this on games.directory ( apologies for the plug ) . You need to use npCommunicationId
and title_id
to map them.
Thanks!! i didn't knew about the gamelist endpoint, this will help me a lot to map in my project!
In case you played some game that it's part of a bundle like Devil May Cry HD Collection or NARUTO SHIPPUDEN™: Ultimate Ninja® STORM TRILOGY, the game specific game that you played from the bundle does not apears in the return, this function just brings the collection info.