everyday/gmodstore-sdk

欢迎使用 GmodStore API!您可以使用我们的 API 访问 GmodStore API 端点,这些端点可以用于以编程方式与 GmodStore 交互。

该包的规范存储库似乎已丢失,因此该包已被冻结。

3.1.0 2022-05-04 06:27 UTC

This package is auto-updated.

Last update: 2024-07-23 22:02:38 UTC


README

欢迎使用 GmodStore API!您可以使用我们的 API 访问 GmodStore API 端点,这些端点可以用于以编程方式与 GmodStore 交互。

此 PHP 包由 OpenAPI Generator 项目自动生成

  • API 版本:1.2.0
  • 构建包:org.openapitools.codegen.languages.PhpClientCodegen 了解更多信息,请访问 https://docs.gmodstore.com

要求

PHP 7.2 及以上版本

安装与使用

Composer

要使用 Composer 安装绑定,请运行以下命令

composer require everyday/gmodstore-sdk

手动安装

下载文件并包含 autoload.php

    require_once('/path/to/GmodStore SDK/vendor/autoload.php');

测试

要运行单元测试

composer install
./vendor/bin/phpunit

入门指南

请遵循 安装程序,然后运行以下命令

<?php
require_once(__DIR__ . '/vendor/autoload.php');



// Configure Bearer (API Key) authorization: bearerAuth
$config = Everyday\GmodStore\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Everyday\GmodStore\Sdk\Api\AddonCouponsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$addonId = 56; // int | Id of the addon
$addonCoupon = new \Everyday\GmodStore\Sdk\Model\AddonCoupon(); // \Everyday\GmodStore\Sdk\Model\AddonCoupon | 
$with = array('with_example'); // string[] | The relations you want to fetch with the `AddonCoupon`

try {
    $result = $apiInstance->createAddonCoupon($addonId$addonCoupon$with);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AddonCouponsApi->createAddonCoupon: ', $e->getMessage(), PHP_EOL;
}

?>

API 端点文档

所有 URI 都相对于 https://api.gmodstore.com/v2

模型文档

授权文档

bearerAuth

  • 类型:Bearer 认证(API 密钥)