topmcfrance/api-client
Composer 安装命令:
composer require topmcfrance/api-client
包简介
TopMcFrance Api client for PHP
README 文档
README
Check a code to vote on the site of TopMcFrance before giving a reward for his vote.
For each vote on the site TopMcFrance with enabled API.
The site generates a verification code to enter the site.
This class allows check TopMcFrance about the validity of a code.
Each generated code is unique to the server and can only be used one time.
The Api is currently on developement.
Installation by composer
Add into you composer.json :
"topmcfrance/api-client": "^1.0"
Installation by autoload
If you haven't composer, you can include the autoload.php into you webpage
require_once "topmcfrance-api/autoload.php";
Usage
use TopMcFrance\Api\VoteChecker; use TopMcFrance\Api\ApiException; $serverId = 1; // Your server Id $code = '123456789' // Code take by our user after voting; $voteChecker = new VoteChecker($serverId); try{ $voteChecker->checkCode($code); // vote confirmed, you can give so many diamond ! } catch(ApiException $e){ $error = $e->getApiMessage(); // error in check, see ApiException for more option }
统计信息
- 总下载量: 25
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-07-05