minotaurlogistics/ebay-taxonomy-api

使用分类API来发现最适合卖家出售库存商品的eBay类别,以及买家浏览或搜索购买商品的很可能的类别。此外,分类API还提供有关必需和推荐类别方面的元数据,并提供两个用于检索零件兼容性信息的功能。

1.0 2021-06-22 20:36 UTC

This package is auto-updated.

Last update: 2024-09-23 03:50:22 UTC


README

使用分类API来发现最适合卖家出售库存商品的eBay类别,以及买家浏览或搜索购买商品的很可能的类别。此外,分类API还提供有关必需和推荐类别方面的元数据,并提供两个用于检索零件兼容性信息的功能。

安装与使用

要求

PHP 7.2及更高版本。

Composer

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

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/minotaurlogistics/ebay-taxonomy-api.git"
    }
  ],
  "require": {
    "minotaurlogistics/ebay-taxonomy-api": "*@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: api_auth
$config = Swagger\EbayTaxonomyClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Swagger\EbayTaxonomyClient\Api\CategoryTreeApi(
    // 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
);
$category_tree_id = 'category_tree_id_example'; // string | The unique identifier of the eBay category tree being requested.

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

API端点

所有URI都是相对于https://api.ebay.com/commerce/taxonomy/v1

模型

授权

api_auth

测试

要运行测试,请使用

composer install
vendor/bin/phpunit

作者

关于此包

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

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