andshrew / PlayStation-Trophies

Sony has an API for retrieving details of the trophies an account has earned, but there is no public documentation for using it. This is an attempt at documenting the API by capturing the requests made by the https://my.playstation.com web site.
MIT License
100 stars 4 forks source link

How to get Game Region? #8

Closed ratbo99 closed 2 years ago

ratbo99 commented 2 years ago

hello, is it possible to get the Games Region? With the help of the documentation i was able to write a python programm to track my earned trophies for a OBS TrophyTracker overlay...works fine. But since i played some Stacks it would be nice if i could read out the reagion (eu, na, as etc.) of a game...

can anybody help?

andshrew commented 2 years ago

Hi @ratbo99

I think the answer is not easily. I've not come across any trophy specific API endpoints you can use to figure out which titles and region that a trophy set belongs to.

I think you would have to approach this by working in reverse and essential build out a database to map titles to trophy sets first. So;

  1. Build a list of all titles and their associated data like region.
  2. Query this list of titles to find their associated trophy set npCommunicationId - see Issue 5 for examples of how to do this.
  3. Use this title -> trophy set index you've now built to link to your trophy data.

There are sites like https://orbispatches.com/en/ and https://prosperopatches.com/ which are useful sources for title data, also see http://kood.info/pstic/ for examples of how you might get this data yourself.

I'll leave this open to see if anyone else can offer any advice.

ratbo99 commented 2 years ago

hey, thanks for your answer. after a little bit more research i see that this is not a simple task. but thanks for the links...i will check that. maybe one day i build a small index for regions but for now my trophytracker do what it should. thanks for the documentation. it helps a lot.