streamtrades / public-api
dev-master
2017-11-03 20:33 UTC
Requires
- php: >=5.4
- ext-curl: *
- ext-json: *
- ext-mbstring: *
Requires (Dev)
- friendsofphp/php-cs-fixer: ~1.12
- phpunit/phpunit: ~4.8
- satooshi/php-coveralls: ~1.0
- squizlabs/php_codesniffer: ~2.6
This package is not auto-updated.
Last update: 2024-09-22 13:45:37 UTC
README
SteamTrades RESTful API 的 API 探索器。
此 PHP 包由 Swagger Codegen 项目自动生成
- API 版本:1.0
- 包版本:1.0.0
- 构建包:io.swagger.codegen.languages.PhpClientCodegen
需求
PHP 5.4.0 及以上
安装与使用
Composer
要使用 Composer 安装绑定,请将以下内容添加到 composer.json
{
"repositories": [
{
"type": "git",
"url": "https://github.com/SteamTrades/php-api-client.git"
}
],
"require": {
"streamtrades/public-api": "*@dev"
}
}
然后运行 composer install
手动安装
下载文件并包含 autoload.php
require_once('/path/to/SwaggerClient-php/autoload.php');
入门指南
请按照 安装过程 进行,然后运行以下操作
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure API key authorization: Token SteamTrades\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR API KEY HERE'); SteamTrades\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token'); $api_instance = new SteamTrades\Api\TradeApi(); try { $result = $api_instance->itemMineGet(); print_r($result); } catch (Exception $e) { echo 'Exception when calling TradeApi->itemMineGet: ', $e->getMessage(), PHP_EOL; } ?>
API 端点文档
所有 URI 都相对于 https://steamtrad.es/api/v1
模型文档
- 游戏
- InlineResponse200
- InlineResponse2001
- InlineResponse2002
- InlineResponse2003
- InlineResponse2004
- InlineResponse2005
- InlineResponse404
- InlineResponse4041
- InlineResponse423
- InventoryContext
- 物品
- 物品类别
- 物品 ID 映射
- 扫描物品
- 交易
- 用户信息
授权文档
令牌
- 类型:API 密钥
- API 密钥参数名:Authorization
- 位置:HTTP 头部