cdma-numiscorner/allegro-sdk

https://developer.allegro.pl/about 文档是由 [这个](https://developer.allegro.pl/swagger.yaml) OpenAPI 3.0 规范文件生成的。

1.0.2 2023-01-27 13:59 UTC

This package is auto-updated.

Last update: 2024-09-27 17:18:15 UTC


README

https://developer.allegro.pl/about

文档是由 这个 OpenAPI 3.0 规范文件生成的。

更多信息,请访问 https://github.com/allegro/allegro-api/issues

安装 & 使用

需求

PHP 7.2 及以上版本。

Composer

要通过 Composer 安装绑定,请将以下内容添加到 composer.json

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/cdma-numiscorner/allegro-sdk.git"
    }
  ],
  "require": {
    "cdma-numiscorner/allegro-sdk": "*@dev"
  }
}

然后运行 composer install

手动安装

下载文件并包含 autoload.php

<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');

入门

请按照 安装过程 进行操作,然后运行以下命令

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



// Configure OAuth2 access token for authorization: bearer-token-for-user
$config = OpenAPI\AllegroSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\AllegroSdk\Api\AdditionalServicesApi(
    // 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
);
$additional_services_group_request = new \OpenAPI\AllegroSdk\Model\AdditionalServicesGroupRequest(); // \OpenAPI\AllegroSdk\Model\AdditionalServicesGroupRequest | Additional service group body

try {
    $result = $apiInstance->createAdditionalServicesGroupUsingPOST($additional_services_group_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AdditionalServicesApi->createAdditionalServicesGroupUsingPOST: ', $e->getMessage(), PHP_EOL;
}

API 端点

所有 URI 都相对于 https://api.allegro.pl

模型

授权

应用授权令牌

  • 类型: OAuth
  • 流程: 应用
  • 授权URL: ``
  • 作用域: N/A

用户授权令牌

  • 类型: OAuth
  • 流程: 访问代码
  • 授权URL: https://allegro.pl/auth/oauth/authorize
  • 作用域: N/A

测试

运行测试,请使用

composer install
vendor/bin/phpunit

作者

关于此包

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

  • API版本: latest
    • 包版本: 1.0
  • 构建包: org.openapitools.codegen.languages.PhpClientCodegen