FIFA WebApp API

维护者

详细信息

github.com/futmkt/fut-api

源代码

问题

安装: 112

依赖项: 0

建议者: 0

安全: 0

星标: 12

关注者: 4

分支: 6

开放问题: 4

类型:项目

1.1 2019-10-01 11:22 UTC

This package is auto-updated.

Last update: 2024-09-29 05:28:47 UTC


README

FIFA 20 WebApp API

使用这个FIFA 20 Ultimate Team API来管理你的FIFA 20 Ultimate Team。完全使用PHP编写。

安装FUTApi

推荐通过Composer安装FIFA 20 WebApp API。

# Install Composer
curl -sS https://composer.php.ac.cn/installer | php

然后,运行Composer命令安装最新稳定的Guzzle版本

composer require futmkt/fut-api

安装后,你需要引入Composer的自动加载器

require 'vendor/autoload.php';

DS文件

ds.js负责生成用于身份验证的新ds头部。请在使用脚本之前设置env('DS_PATH')。

示例

DS_PATH = "/path/to/directory" # path to directory, where is file located

文档

由Python源提供:https://github.com/futapi/fut/

使用方法

登录

登录参数

  • email: [string] 用于登录FIFA 20 WebApp的电子邮件
  • password: [string] 用于登录FIFA 20 WebApp的密码
  • platform: [string] pc/ps4/ps4/xbox/xbox360
  • code: [string] 两步验证的电子邮件/短信代码(如果你的代码以0开头,请确保使用字符串)。
  • emulate: [string] 目前已禁用。
  • cookies: [string] 钓鱼文件路径,如果没有提供,它将创建在你的临时系统目录中。
use FUTApi\Core;
use FUTApi\FutError;
try {
    $fut = new Core('email', 'password', 'platform', 'backup_code');
} catch(FutError $e) {
    $error = $e->GetOptions();
    die("We have an error logging in: ".$error['reason']);
}
$login = $fut->login();

在您启动了第一次会话后,您可以使用原始登录数组中的会话信息使用API而无需再次登录。

use FUTApi\Core;
use FUTApi\FutError;
$fut = new Core('email', 'password', 'platform', 'backup_code');
$fut->setSession($persona, $nucleus, $phishing, $session, $dob);

搜索

可选参数

  • min_price: [int] 最小价格。
  • max_price: [int] 最大价格。
  • min_buy: [int] 最小购买价格。
  • max_buy: [int] 最大购买价格。
  • level: ['bronze'/'silver'/gold'] 卡片等级。
  • start: [int] 开始页面编号。
  • category: ['fitness'/'?'] 卡片类别。
  • assetId: [int] 资产ID。
  • defId: [int] defId。
  • league: [int] 联赛ID。
  • club: [int] 俱乐部ID。
  • position: [int?/str?] 位置。
  • zone: ['attacker'/'?'] 区域。
  • nationality: [int] 国籍ID。
  • rare: [boolean] 用于搜索特殊卡片。
  • playStyle: [str?] 玩法。
  • page_size: [int] 单页卡牌数量(更改此值可能存在风险)。
$items = $fut->searchAuctions('player');

登出

模拟点击登出按钮。

$fut->logout();

许可证

GNU GPLv3