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-04-21 11:47:29 UTC
README
API Explorer for SteamTrades' RESTful API.
This PHP package is automatically generated by the Swagger Codegen project:
- API version: 1.0
- Package version: 1.0.0
- Build package: io.swagger.codegen.languages.PhpClientCodegen
Requirements
PHP 5.4.0 and later
Installation & Usage
Composer
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/SteamTrades/php-api-client.git"
}
],
"require": {
"streamtrades/public-api": "*@dev"
}
}
Then run composer install
Manual Installation
Download the files and include autoload.php
:
require_once('/path/to/SwaggerClient-php/autoload.php');
Getting Started
Please follow the installation procedure and then run the following:
<?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; } ?>
Documentation for API Endpoints
All URIs are relative to https://steamtrad.es/api/v1
Class | Method | HTTP request | Description |
---|---|---|---|
TradeApi | gameGet | GET /game/ | List supported games |
TradeApi | gameIdGet | GET /game/{id}/ | Info about a game |
TradeApi | itemMineGet | GET /item/mine/ | List owned items |
TradeApi | itemScanUserInventoryPost | POST /item/scan_user_inventory/ | Scan Steam user inventory |
TradeApi | itemUserInventoryGet | GET /item/user_inventory/ | Get inventory scan results |
TradeApi | tradeGet | GET /trade/ | List your trades |
TradeApi | tradeIdGet | GET /trade/{id}/ | Get trade status |
TradeApi | tradeRequestItemsPost | POST /trade/request_items/ | Request items |
TradeApi | tradeSendItemsPost | POST /trade/send_items/ | Send items |
TradeApi | tradeTransferItemsPost | POST /trade/transfer_items/ | Transfer items |
TradeApi | userInfoBySteamIdGet | GET /user/info_by_steam_id/ | Steam user info by Steam ID |
TradeApi | userInfoByTradeUrlGet | GET /user/info_by_trade_url/ | Steam user info by trade URL |
Documentation For Models
- Game
- InlineResponse200
- InlineResponse2001
- InlineResponse2002
- InlineResponse2003
- InlineResponse2004
- InlineResponse2005
- InlineResponse404
- InlineResponse4041
- InlineResponse423
- InventoryContext
- Item
- ItemCategory
- ItemIdMapping
- ScannedItem
- Trade
- UserInfo
Documentation For Authorization
Token
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header