yoerioptr/tabt-api-client

Frenoy的TabT API的辅助库。更多信息请访问'http://api.frenoy.net/'

v2.0.7 2022-07-29 10:14 UTC

This package is auto-updated.

Last update: 2024-09-29 04:31:34 UTC


README

TabT API客户端是Frenoy的TabT API的辅助库

设置

基本的设置以帮助您开始使用客户端。

首先,使用Composer安装包

composer require yoerioptr/tabt-api-client

按照以下示例实例化TabT API客户端

use Yoerioptr\TabtApiClient\Client\Client;
use Yoerioptr\TabtApiClient\Entries\CredentialsType;
use Yoerioptr\TabtApiClient\Tabt;

// Instantiate the client
$client = new Client();

// Optionally you can provide your credentials
$credentials = new CredentialsType('username', 'password');
$client->setCredentials($credentials);

// Instantiate the TabT Api Client
$tabt = new Tabt($client);

发送请求

执行请求使用仓库,这些可以从TabT辅助类轻松访问。

$testResponse = $tabt->test()->info();

所有可用的请求都可以在这里找到这里