kuper-adrian / pubg-royale

A Node.js pubg api wrapper with built-in caching
MIT License
3 stars 3 forks source link

Wrong URL format for pc-regions #4

Closed kuper-adrian closed 5 years ago

kuper-adrian commented 5 years ago

PUBG API v6.0.0 released October 3rd and changed the URL format for getting the season stats of any given player.

Old format:

https://api.pubg.com/shards/pc-{region}/players/{accountId}/seasons/{seasonId}

New format:

https://api.pubg.com/shards/{steam or kakao}/players/{accountId}/seasons/{seasonId}

More info on api v6.0.0 here.

Since pubg-royale still uses the old format, it only returns empty gameModeStats objects at the moment :disappointed: To fix this the playerStats() function must be adjusted to the new url format for every PC region (the XBOX regions still use the old format!).

Since its Hacktoberfest I will leave this issue up for grabs for some time for anyone interested in earning another pull request towards his awesome t-shirt :wink:

This would also fix issue kuper-adrian/statg-bot#12 of the statg-discord-bot.

alizhdanov commented 5 years ago

Hey, how do you know whether it's steam or kakao? :-)

kuper-adrian commented 5 years ago

Good question :sweat_smile: Well at least the pc-kakao region should use kakao instead of steam but I don't really know if any of the other seasons do, sorry. I think it would be fine if only pc-kakao uses kakao for now. If other regions also need to use kakao, it could be fixed later.

alizhdanov commented 5 years ago

Ok, I'll do it then