Jump to content


General Discussion of Wargaming Public API


  • Please log in to reply
833 replies to this topic

MajesticFlight #821 Posted 20 March 2019 - 08:59 PM

    Private

  • Player
  • 4659 battles
  • 10
  • [YGDRA] YGDRA
  • Member since:
    03-10-2019

View Postkaadomin, on 20 March 2019 - 03:24 PM, said:

 

I do:

 

   Number of random battles with TankA   *   tier (TankA)

+ Number of random battles with TankB   *   tier (TankB)

+ Number of random battles with TankC   *   tier (TankC)

...

_______________________________________

= MySum

 

average tier =  MySum / overall Number of random battles

 

You take it from encyclopedia/tanks? There is a warning for my method "Attention! The method is deprecated.". Maybe that's why WG blocked it.

Edited by MajesticFlight, 20 March 2019 - 09:15 PM.


kaadomin #822 Posted 20 March 2019 - 11:28 PM

    Major

  • Player
  • 32571 battles
  • 2,923
  • [NXD] NXD
  • Member since:
    06-11-2012

View PostMajesticFlight, on 20 March 2019 - 08:59 PM, said:

 

You take it from encyclopedia/tanks? There is a warning for my method "Attention! The method is deprecated.". Maybe that's why WG blocked it.

 

You want "player's average tier"

 

Part 1

For player data I use (XXXXXXXXXXXXXXXXXXXXX= > APP-ID and my Account-ID) and put a space after the https, to avoid auto links

 

https ://api.worldoftanks.eu/wot/tanks/stats/?application_id=XXXXXXXXXXXXXXXXXXXXX&account_id=503866246

 

Spoiler

 

in all-Section you will find the value battles

 

Part 2

Now the vehicles, I think this was your main problem

I ask for every single tier this way

for ($tier = 1; $tier < 11; $tier++)  ....

https ://api.worldoftanks.eu/wot/encyclopedia/vehicles/?tier=$tier

 

Here you have tier as field in the result, but if you to it stepwise you have the tier as entry parameter ;)

There was a reason I do it for every single tier ... maybe because the maximum number of tank IDs is 100 ans I had some problems - maybe the same like you have

 

Finally

I check all my accounts in Part 1 for missing tank IDs in result of Part 2  and do a direct request for the tank ID / list of IDs, like before in Part 2.

 

 



MajesticFlight #823 Posted 24 March 2019 - 08:15 PM

    Private

  • Player
  • 4659 battles
  • 10
  • [YGDRA] YGDRA
  • Member since:
    03-10-2019

View Postkaadomin, on 20 March 2019 - 11:28 PM, said:

 

You want "player's average tier"

 

Part 1

For player data I use (XXXXXXXXXXXXXXXXXXXXX= > APP-ID and my Account-ID) and put a space after the https, to avoid auto links

 

https ://api.worldoftanks.eu/wot/tanks/stats/?application_id=XXXXXXXXXXXXXXXXXXXXX&account_id=503866246

 

Spoiler

 

in all-Section you will find the value battles

 

Part 2

Now the vehicles, I think this was your main problem

I ask for every single tier this way

for ($tier = 1; $tier < 11; $tier++)  ....

https ://api.worldoftanks.eu/wot/encyclopedia/vehicles/?tier=$tier

 

Here you have tier as field in the result, but if you to it stepwise you have the tier as entry parameter ;)

There was a reason I do it for every single tier ... maybe because the maximum number of tank IDs is 100 ans I had some problems - maybe the same like you have

 

Finally

I check all my accounts in Part 1 for missing tank IDs in result of Part 2  and do a direct request for the tank ID / list of IDs, like before in Part 2.

 

 

encyclopedia/vehicles  Takes a really  long time to show.

And I see only tiers of modules there(engines, suspensions, not whole tank's tiers). Or am I missing something?


Edited by MajesticFlight, 24 March 2019 - 08:20 PM.


kaadomin #824 Posted 25 March 2019 - 12:05 AM

    Major

  • Player
  • 32571 battles
  • 2,923
  • [NXD] NXD
  • Member since:
    06-11-2012

View PostMajesticFlight, on 24 March 2019 - 08:15 PM, said:

encyclopedia/vehicles  Takes a really  long time to show.

And I see only tiers of modules there(engines, suspensions, not whole tank's tiers). Or am I missing something?​

 

Sample request for tier 1 if you only want tank-ID and tier for average tier:

https ://api.worldoftanks.eu/wot/encyclopedia/vehicles/?application_id=XXXXXXXXXXXXXXXXXXXXXXXX&tier=1&fields=tier

 

result contains:

 

"data": {

      "81": {
          "tier": 1
     },
     "113": {
          "tier": 1
     },
     "129": {
          "tier": 1
     },

....

}

BTW: I have a table for tanks (including IDs, names, tier ...) because I don't want to ask API to often, because its a little bit time consuming. You can also do it without tier parameter (but still with fields=tier) and use page parameter to get result page number (page_no)

I think, this is the better way - let it run until there is no more data inside page_no= 1...2...3...4...5 maybe with a little sleep inside to limit the count of requests per second.

Sample:

 

https ://api.worldoftanks.eu/wot/encyclopedia/vehicles/?application_id=XXXXXXXXXXXXXXXXXXXXXXXX&fields=tier&page_no=1



kaadomin #825 Posted 26 March 2019 - 02:42 PM

    Major

  • Player
  • 32571 battles
  • 2,923
  • [NXD] NXD
  • Member since:
    06-11-2012
May I ask for an update of the friend list in API? At the moment it's not synchronized - 18 friends in game and 15 at the API in the list with latest additions.

RnRolla #826 Posted 20 April 2019 - 10:24 AM

    Second Lieutenant

  • Player
  • 24046 battles
  • 1,230
  • [RAKIA] RAKIA
  • Member since:
    11-29-2013
Why there is no data for random battles assisted damage in Player's vehicles / Vehicle statistics section? There is stun_assisted_damage data, but no regular (radio/tracks) assisted dmg. 

Turtle_heading #827 Posted 14 May 2019 - 06:11 PM

    Lance-corporal

  • Player
  • 24716 battles
  • 60
  • [V_O_W] V_O_W
  • Member since:
    09-24-2016
Is there anyway someone can develop a setting within the game that stops you showing up as online to your friends and clan memebers, sometimes it is nice to just have a few hours where I can play in peace without people thinking I am being ignorant (which I guess I am)

Dak28 #828 Posted 25 June 2019 - 03:58 PM

    Sergeant

  • Player
  • 43072 battles
  • 210
  • [HOOT] HOOT
  • Member since:
    08-29-2011
client id is language no more included in the API?

Edited by Dak28, 25 June 2019 - 06:57 PM.


sfa #829 Posted 31 July 2019 - 02:29 PM

    Private

  • Player
  • 12554 battles
  • 19
  • [TEC] TEC
  • Member since:
    09-23-2012

Has anybody else noticed the huge discrepancy between clan ranks shown in game versus reflected on the API?

 

Example: Game client shows my clan at rank 35 or so for tier 6 skirmishes, but on the API our fb_elo_rating_6 is 83. 

 

I thought maybe the API counted some clans with high ELO that have recently been inactive in that particular mode/tier, but no, using https://api.worldoft...ings/neighbors/ ("adjacent positions in clan ratings&quot;), I can actually list all the clans ranked higher and none of them has an "exclude_reason" flag set for fb_elo_rating_6.

 

It's also not due to a synchronization lag or something - whenever we play, the effect on rank is reflected in the API data after the next API update the very next day. There's just that huge offset in the ranks...

 

WG's clan portal is clever - it only displays the ELO values for specific stronghold tiers, but not the ranks. The ELO value itself seems to correspond to the API value.

 

Is there any way to get the actual rank as displayed in game?


Edited by sfa, 31 July 2019 - 02:39 PM.


michalbarczyk #830 Posted 13 August 2019 - 12:09 PM

    Private

  • Player
  • 8052 battles
  • 3
  • Member since:
    12-18-2013
What does all.xp (for particular tank & particular player) mean? I can see that it's explained as "Total experience", but it differs from XP value in WoT PC game.

kaadomin #831 Posted 13 August 2019 - 12:28 PM

    Major

  • Player
  • 32571 battles
  • 2,923
  • [NXD] NXD
  • Member since:
    06-11-2012

View PostRnRolla, on 20 April 2019 - 10:24 AM, said:

Why there is no data for random battles assisted damage in Player's vehicles / Vehicle statistics section? There is stun_assisted_damage data, but no regular (radio/tracks) assisted dmg. 

 

You had unrecorded assisted damage for a long time, so any value in API will incorect. The stun ingame was added nearly at the same time as in the API.

 

View PostTurtle_heading, on 14 May 2019 - 06:11 PM, said:

Is there anyway someone can develop a setting within the game that stops you showing up as online to your friends and clan memebers, sometimes it is nice to just have a few hours where I can play in peace without people thinking I am being ignorant (which I guess I am)

 

I'm ignorant too.

 

(no, we can't because we can not change the data the game or the API will get.)

 

View PostDak28, on 25 June 2019 - 03:58 PM, said:

client id is language no more included in the API?

 

gone ... bad ... only to prevent nation A and nation B from starting flame wars on nationality.

 

View Postmichalbarczyk, on 13 August 2019 - 12:09 PM, said:

What does all.xp (for particular tank & particular player) mean? I can see that it's explained as "Total experience", but it differs from XP value in WoT PC game.

 

not sure - what value we are talking about ingame? I have no WoT on this PC.  BTW - I think this is a useless value because of booster, influence of premium account ...

 

View Postsfa, on 31 July 2019 - 02:29 PM, said:

Has anybody else noticed the huge discrepancy between clan ranks shown in game versus reflected on the API?

 

afaik the API gets an update every day - ingame you see the update after some minutes.

 



michalbarczyk #832 Posted 13 August 2019 - 01:05 PM

    Private

  • Player
  • 8052 battles
  • 3
  • Member since:
    12-18-2013

View Postkaadomin, on 13 August 2019 - 12:28 PM, said:

 

You had unrecorded assisted damage for a long time, so any value in API will incorect. The stun ingame was added nearly at the same time as in the API.

 

 

I'm ignorant too.

 

(no, we can't because we can not change the data the game or the API will get.)

 

 

gone ... bad ... only to prevent nation A and nation B from starting flame wars on nationality.

 

 

not sure - what value we are talking about ingame? I have no WoT on this PC.  BTW - I think this is a useless value because of booster, influence of premium account ...

 

 

afaik the API gets an update every day - ingame you see the update after some minutes.

 

Actually, my intention was to check how many experience has particular player on particular tank. Can I find it somewhere in the API?


Edited by michalbarczyk, 13 August 2019 - 01:06 PM.


kaadomin #833 Posted 13 August 2019 - 02:05 PM

    Major

  • Player
  • 32571 battles
  • 2,923
  • [NXD] NXD
  • Member since:
    06-11-2012

View Postmichalbarczyk, on 13 August 2019 - 01:05 PM, said:

Actually, my intention was to check how many experience has particular player on particular tank. Can I find it somewhere in the API?

 

If I ask for the T-34 on one of my accounts (api.worldoftanks.eu/wot/tanks/stats/?application_id=your_app_id&tank_id=1&account_id=you_account_id), i'll get:

 

"all": {  [..]

"xp": 5976,
"battles": 12,
"battle_avg_xp": 498,

},

 

But I know the T-34 is full equipped (except one useless gun), and I remember there are about 20k XP on it for the T-34-85. This depends on referral program +50%, premium account +50%, 5 times 3x with premium account, 4x first victory of a day ... you and I don't know how much free XP I used to equip this tank.

 

Finaly 5976 are a lot less than 20k. I think, you can receive this value only from the game client via a modification.



michalbarczyk #834 Posted 19 August 2019 - 04:16 PM

    Private

  • Player
  • 8052 battles
  • 3
  • Member since:
    12-18-2013
Am I allowed to use data provided by API in an Android application which is going to be released in Google Play?




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users