src/Commerce/TranslationBeta/V1/README.md
# brandon14/ebay-commerce-translation-beta-v1
This API allows 3rd party developers to translate item titles.
## Installation & Usage
### Requirements
PHP 7.3 and later.
Should also work with PHP 8.0 but has not been tested.
### Composer
To install the bindings via [Composer](https://getcomposer.org/), add the following to `composer.json`:
```json
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/brandon14/ebay-commerce-translation-beta-v1.git"
}
],
"require": {
"brandon14/ebay-commerce-translation-beta-v1": "*@dev"
}
}
```
Then run `composer install`
### Manual Installation
Download the files and include `autoload.php`:
```php
<?php
require_once('/path/to/brandon14/ebay-commerce-translation-beta-v1/vendor/autoload.php');
```
## Getting Started
Please follow the [installation procedure](#installation--usage) and then run the following:
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: api_auth
$config = TNT\Ebay\Commerce\TranslationBeta\V1\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new TNT\Ebay\Commerce\TranslationBeta\V1\Api\LanguageApi(
// 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
);
$translate_request = new \TNT\Ebay\Commerce\TranslationBeta\V1\Model\TranslateRequest(); // \TNT\Ebay\Commerce\TranslationBeta\V1\Model\TranslateRequest
try {
$result = $apiInstance->translate($translate_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LanguageApi->translate: ', $e->getMessage(), PHP_EOL;
}
```
## API Endpoints
All URIs are relative to *https://api.ebay.com/commerce/translation/v1_beta*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*LanguageApi* | [**translate**](docs/Api/LanguageApi.md#translate) | **POST** /translate |
## Models
- [Error](docs/Model/Error.md)
- [ErrorParameter](docs/Model/ErrorParameter.md)
- [TranslateRequest](docs/Model/TranslateRequest.md)
- [TranslateResponse](docs/Model/TranslateResponse.md)
- [Translation](docs/Model/Translation.md)
## Authorization
### api_auth
- **Type**: `OAuth`
- **Flow**: `application`
- **Authorization URL**: ``
- **Scopes**:
- **https://api.ebay.com/oauth/api_scope**: View public data from eBay
## Tests
To run the tests, use:
```bash
composer install
vendor/bin/phpunit
```
## Author
## About this package
This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: `v1_beta.1.4`
- Build package: `org.openapitools.codegen.languages.PhpClientCodegen`