luongtran / sdk-ebay-rest-media
媒体API允许卖家创建、上传和获取视频。
dev-master
2023-10-25 13:49 UTC
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ~6.0
- guzzlehttp/psr7: ~1.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.12
- phpunit/phpunit: ~4.0
This package is not auto-updated.
Last update: 2024-09-11 17:50:36 UTC
README
媒体API允许卖家创建、上传和获取视频。
安装与使用
要求
PHP 7.3及更高版本。也应在PHP 8.0上工作,但尚未测试。
Composer
要通过Composer安装绑定,请将以下内容添加到composer.json
{ "repositories": [ { "type": "vcs", "url": "https://github.com/macropage/sdk-ebay-rest-media.git" } ], "require": { "macropage/sdk-ebay-rest-media": "*@dev" } }
然后运行composer install
手动安装
下载文件并包含autoload.php
<?php require_once('/path/to/sdk-ebay-rest-media/vendor/autoload.php');
入门
请按照安装过程进行操作,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure OAuth2 access token for authorization: Authorization Code $config = LT\SDKs\ebay\rest\media\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new LT\SDKs\ebay\rest\media\Api\VideoApi( // 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 ); $body = new \LT\SDKs\ebay\rest\media\Model\CreateVideoRequest(); // \LT\SDKs\ebay\rest\media\Model\CreateVideoRequest try { $apiInstance->createVideo($body); } catch (Exception $e) { echo 'Exception when calling VideoApi->createVideo: ', $e->getMessage(), PHP_EOL; }
API端点
所有URI均相对于https://apim.ebay.com/commerce/media/v1_beta
模型
授权
授权代码
- 类型:
OAuth
- 流程:
accessCode
- 授权URL:
https://auth.ebay.com/oauth2/authorize
- 作用域:
- https://api.ebay.com/oauth/api_scope/sell.inventory: 查看和管理您的库存和报价
测试
要运行测试,请使用
composer install vendor/bin/phpunit
作者
关于此包
此PHP包由OpenAPI Generator项目自动生成
- API版本:
v1_beta.1.0
- 包版本:
2.3.2
- 包版本:
- 构建包:
org.openapitools.codegen.languages.PhpClientCodegen