artur-stepien / wot-wn8
使用https://github.com/artur-stepien/wargaming-papi API接口计算《坦克世界》WN8值
v1.3.0
2022-05-09 15:29 UTC
Requires
- php: >=7.0.0
- ext-curl: *
- ext-json: *
- artur-stepien/wargaming-papi: 1.4.*
Requires (Dev)
- phpunit/phpunit: ^8.5
Conflicts
This package is auto-updated.
Last update: 2024-09-09 21:14:21 UTC
README
PHP类,用于处理《坦克世界》WN8统计数据。此类使用Wargaming\Api实例,并需要注册Wargaming开发者应用程序。
示例用法
最好使用composer管理依赖项。
<?php use Wargaming\Language\EN; use Wargaming\Server\EU; use Wargaming\Api; use Wargaming\WoT\WN8; // Include API and WN8 class require_once __DIR__.'/vendor/autoload.php'; // NOTICE: Replace YOUR_APPLICATION_ID with your application key. $language = new EN(); $server = new EU('YOUR_APPLICATION_ID'); $api = new Api($language, $server); // Test method to get WN8 of player ESL_Gorilla on EU server. try { echo 'Calculated WN8 for player [ESL_Gorilla]: '.(string)(new WN8($api, 'ESL_Gorilla')); } catch (Exception $e) { // Ups we got an error die($e->getMessage()); }
变更日志
1.3.0 - 2022-05-09
- 更改API版本支持到>1.4.x,注意:您需要使用新的API实例,因此在更新时请确保更新您的代码!
- 将异常更改为RuntimeException
1.2.2 - 2022-02-07
- 更新composer.lock
- 代码小更新。
1.2 - 2019-01-06
- 修复了使用modxvm的预期坦克值计算的WN8。
- 添加测试以确保类按预期工作。
1.1 - 2015-08-20
- 添加了计算准确WN8的选项。当启用此选项时,缺失的坦克将从账户摘要中删除。请注意,准确计算比预期慢25%到35%,因为它需要为每个缺失的坦克获取统计数据。
- 还将加载预期坦克值移动到单独的方法中,以允许重写。
1.0 - 2015-08-19
- 类已发布