streamtrades/public-api

dev-master 2017-11-03 20:33 UTC

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

模型文档

授权文档

令牌

  • 类型:API 密钥
  • API 密钥参数名:Authorization
  • 位置:HTTP 头部

作者

devs@steamtrad.es