World of Tanks

API Woes for the uninformed. Or in other words, “Why stats tracking is b0rked for the foreseeable future.”

WorldofTanks8 - API Woes for the uninformed. Or in other words, "Why stats tracking is b0rked for the foreseeable future."
Loading...

I know I've already ranted a bit about the API changes. You can review my submission history if you want a healthy dose of sarcasm and vinegar.

However, I think straightforward facts may help explain a lot to you all. Let's begin with what really changed with the API and how that impacts current projects.


What was the previous norm?

Formerly, Xbox and PS4 had different API URLs: api-xbox-console.worldoftanks.com/wotx/ and api-ps4-console.worldoftanks.com/wotx/. User account IDs were also split into two groups to differentiate between platforms: 500-15400000 for Xbox; 1073740000-1083900000 for PS4. So, developers had to change their searches per platform. It also meant that they could comfortably know what platform an account was for based on ID. This was used to simplify my current project (WoTPlayerTrackerV2). Did the design make sense? Yes and no. It certainly could've been unified from the start but they made a decision and stuck with it.


What has changed that causes problems?

  1. Now, the API URL is api-console.worldoftanks.com/wotx/ and is used for both platforms.
    1. This is great as you no longer need to split things up, but the old URLs were immediately removed.
    2. Again, no forewarning was given.
  2. Another complication is the change in usernames.
    1. Now in the API, your "nickname" (gamer tag) has -x or -p added at the end.
    2. Most SQL databases require setting a maximum string length when creating a text field. If the new appendage causes a username to exceed this, it'll cause errors. (I cannot attest to the design of other stat tracker projects).
    3. Searching for users currently doesn't work as well as it did before (reported by other developers)
    4. How projects handle this may take significant time to revise (UI changes, etc.)
  3. Account IDs no longer match the old pattern (see "attachment" #1)
  4. Accounts that have not logged in since the change do not show any data.
    1. Stat trackers (MoE, WN8) are most certainly impacted by this
  5. Some account IDs have changed. See attachment 2

Summary

It's going to take several weeks to get public trackers up and working again to a level of confidence that existed prior to this shitshow of a migration. I'm glad all of you are supportive and patient as the various developers race to get their sites fixed. I'm really disappointed in this breaking changes by WG but there's really not much we can do about it than try all over again.


Attachments

#1

Notice that both Xbox and PS4 usernames are now in the numbering range that previously was exclusive to PS4.

Загрузка...
battletracker=# select max(account_id), console from players group by console; max | console ------------+--------- 1084073028 | ps4 15444103 | xbox battletracker=# select * from players where account_id>=1084073020; account_id | nickname | console | created_at | last_battle_time | updated_at | battles | _last_api_pull ------------+-------------------+---------+---------------------+---------------------+---------------------+---------+---------------------------- 1084073020 | Kimpossible9647-x | ps4 | 2020-07-25 04:40:25 | 1970-01-01 00:00:00 | 2020-07-25 04:40:30 | 0 | 2020-07-25 04:44:50.422929 1084073021 | Skinnerrrrr-x | ps4 | 2020-07-25 04:41:27 | 1970-01-01 00:00:00 | 2020-07-25 04:41:32 | 0 | 2020-07-25 04:44:50.422929 1084073022 | penderbender629-p | ps4 | 2020-07-25 04:41:32 | 1970-01-01 00:00:00 | 2020-07-25 04:41:37 | 0 | 2020-07-25 04:44:50.422929 1084073023 | AdmittedColt162-x | ps4 | 2020-07-25 04:41:34 | 1970-01-01 00:00:00 | 2020-07-25 04:43:43 | 0 | 2020-07-25 04:44:50.422929 1084073024 | Nanuk09-x | ps4 | 2020-07-25 04:42:02 | 1970-01-01 00:00:00 | 2020-07-25 04:42:07 | 0 | 2020-07-25 04:44:50.422929 1084073025 | baconhamsausage-p | ps4 | 2020-07-25 04:42:13 | 1970-01-01 00:00:00 | 2020-07-25 04:42:19 | 0 | 2020-07-25 04:44:50.422929 1084073026 | hubibi__Jafar-p | ps4 | 2020-07-25 04:42:30 | 1970-01-01 00:00:00 | 2020-07-25 04:42:35 | 0 | 2020-07-25 04:44:50.422929 1084073027 | RadialCircle557-x | ps4 | 2020-07-25 04:43:00 | 1970-01-01 00:00:00 | 2020-07-25 04:43:05 | 0 | 2020-07-25 04:44:50.422929 1084073028 | hoeazzdude-p | ps4 | 2020-07-25 04:43:57 | 1970-01-01 00:00:00 | 2020-07-25 04:44:02 | 0 | 2020-07-25 04:44:50.422929 

#2.

Some player account IDs have changed completely.

Before:

battletracker=# select * from players where nickname='Raggersons'; account_id | nickname | console | created_at | last_battle_time | updated_at | battles | _last_api_pull ------------+------------+---------+---------------------+---------------------+---------------------+---------+---------------------------- 1083906365 | Raggersons | ps4 | 2020-06-08 18:16:48 | 2020-07-21 02:36:23 | 2020-07-21 02:36:24 | 14 | 2020-07-21 04:54:12.054507 (1 row) 

After:

select * from players where account_id<=16000000 and nickname like '%-p'; account_id | nickname | console | created_at | last_battle_time | updated_at | battles | _last_api_pull ------------+--------------------+---------+---------------------+---------------------+---------------------+---------+---------------------------- 6578842 | Raggersons-p | xbox | 2015-08-02 10:31:33 | 2020-07-25 00:08:44 | 2020-07-25 00:08:45 | 30513 | 2020-07-25 01:15:27.35952 

Notice that the created_at value is different. Are these different players, or the same account with some info changed? It's difficult to tell without a solid backup.

Source: Original link


Loading...
© Post "API Woes for the uninformed. Or in other words, “Why stats tracking is b0rked for the foreseeable future.”" for game World of Tanks.


Top 10 Most Anticipated Video Games of 2020

2020 will have something to satisfy classic and modern gamers alike. To be eligible for the list, the game must be confirmed for 2020, or there should be good reason to expect its release in that year. Therefore, upcoming games with a mere announcement and no discernible release date will not be included.

Top 15 NEW Games of 2020 [FIRST HALF]

2020 has a ton to look forward to...in the video gaming world. Here are fifteen games we're looking forward to in the first half of 2020.

You Might Also Like

Leave a Reply

Your email address will not be published. Required fields are marked *