Jump to content
Korean Random
Ekspoint

среднее количество очков захвата на танке

Recommended Posts

Можно ли как то узнать среднее количество очков захвата на танке?

Share this post


Link to post

Short link
Share on other sites

Инфа открытая в профиле игроков на сайте, в клиенте в Достижения-Статистика. Очки захвата базы/кол-во боёв.

Share this post


Link to post

Short link
Share on other sites
from urllib2 import urlopen
from json import load

def getCap(acc_id):
try:
stat = load(urlopen('http://api.worldoftanks.ru/wot/account/info/?application_id=demo&fields=statistics.all.capture_points,statistics.all.battles&account_id=%s' % acc_id))
stat = stat['data'][str(acc_id)]['statistics']['all']
return float(stat['capture_points'])/stat['battles']
except:pass

print getCap(11111)
Edited by ShadowHunterRUS

Share this post


Link to post

Short link
Share on other sites

близко, но мне нужно на определенным танке, а не вообще на акке

ид танка 123456 и на нем уже capture_points делить на battles

Edited by Ekspoint

Share this post


Link to post

Short link
Share on other sites

Один из параметров запроса: tank_id - Идентификатор техники игрока

 

Для примера:

http://api.worldoftanks.ru/wot/tanks/stats/?application_id=demo&fields=all.capture_points&account_id=25106393&tank_id=59649&in_garage=1
Ответ:

{
    "status": "ok",
    "meta": {
        "count": 1
    },
    "data": {
        "25106393": [
            {
                "all": {
                    "capture_points": 39
                }
            }
        ]
    }
}
Edited by ShuraBB

Share this post


Link to post

Short link
Share on other sites

Один из параметров запроса: tank_id - Идентификатор техники игрока

да, но параметры отдельно от ид танка
  • Downvote 1

Share this post


Link to post

Short link
Share on other sites

>но параметры отдельно от ид танка

Не понял, поясни плиз

Share this post


Link to post

Short link
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...