Closed Negativitet closed 5 years ago
Yes, I'm adding 3 fields to getPlayer() to help make the distinction
portal (Hi-Rez, Steam, PSN, Xbox) portal_id portal_userid
So we only send into getPlayer() the display name and then check which portal it returns, gotcha =)
Hi again! Noticed something that might be a problem: Searching a name on the PSN/Xbox portal can at some times give the first matching Steam player ID on that name.
Example: Xbox Gamertag: Julie Should return HiRez Player ID: 5261617 Just sending it into the getPlayer() with portal Xbox seem to return a steam users ID.
// Joakim
Good catch.
Should now be fixed.
Hi again @apugh there still seems to be some issue with this :/
Running getPlayer() on username adammanson on PSN returns 7857945 but from everything I can see it should return 5460555
// Joakim
hmm ... adammanson isn't enough to uniquely identify this player because that value is a gamer_tag for both PSN (portal_id = 9, player_id 5460555 ) and Discord (portal_id = 25, player_id 7857945).
How did you know that 5460555 was correct/desired? Can you use that in your calls? Otherwise we may need to add an optional portal_id field to the getPlayer() call for Realm.
I searched for adammanson on trackernetwork and they returned both PSN 5460555 and Discord 7857945 and as I wanted the PSN I choose the PSN one.
However when I tell the getPlayer endpoint to search for "adammanson/PSN" it returns the ID 7857945 and not 5460555
Should I do it another way?
I've ordered it to give PSN priority over Discord. Beyond that I'll need to make some changes to the API inline with SMITE & Paladins.
Is there a better way to find the correct ID instead of specifying which platform you want, maybe as an array result with each platform ID it could find the user on that I can traverse to find the PSN/XBOX/Steam ID for every new users that connects?
Since the fix you did it is return the correct ID. But what happens if the same username exists for all 4 platforms Steam/Xbox/PSN/Discord, which one will it return?
Currently, if you specify playerIdType as Steam it will definitely be Steam.
If not explicitly Steam the order is portal_id, 1, 9, 10, 22, 25 (PC, PSN, Xbox, Switch, Discord) depending on what exists.
Let me think about how to improve this.
Suggestion would be Instead of a priority order I would recommend returning all matches on the searched name and their respective platforms. Then we can select the ID to use from the list.
For consistency with SMITE/Paladins, I've added these 3 endpoints to Realm:
I didn't want the Realm logic to diverge to much from the other 2 APIs.
I will update this github endpoint documentation today with additional details.
In short, you could have found adammanson with this type of call:
That seems to work great! Thanks for that =)
Is PS4/XB1 users available in the API yet?