Conversion_Kitchen_Code/kitchen_counter/conversion/subtitling/docs/TranslateApi.md

121 lines
4.1 KiB
Markdown
Raw Normal View History

2024-04-27 09:33:09 +00:00
# swagger_client.TranslateApi
All URIs are relative to *https://api-b2b.backenster.com/b1/api/v3*
Method | HTTP request | Description
------------- | ------------- | -------------
[**get_languages_get**](TranslateApi.md#get_languages_get) | **GET** /getLanguages | Getting the list of languages
[**translate_post**](TranslateApi.md#translate_post) | **POST** /translate | Text translation
# **get_languages_get**
> InlineResponse200 get_languages_get(platform, code=code)
Getting the list of languages
### Example
```python
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: APIKeyHeader
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.TranslateApi(swagger_client.ApiClient(configuration))
platform = 'api' # str | api (default to api)
code = 'en_GB' # str | the language code in the format “language code_code of the country”, which is used to display the names of the languages. The language code is represented only in lowercase letters, the country code only in uppercase letters (example en_GB, es_ES, ru_RU etc). If this option is not present, then English is used by default (optional) (default to en_GB)
try:
# Getting the list of languages
api_response = api_instance.get_languages_get(platform, code=code)
pprint(api_response)
except ApiException as e:
print("Exception when calling TranslateApi->get_languages_get: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**platform** | **str**| api | [default to api]
**code** | **str**| the language code in the format “language code_code of the country”, which is used to display the names of the languages. The language code is represented only in lowercase letters, the country code only in uppercase letters (example en_GB, es_ES, ru_RU etc). If this option is not present, then English is used by default | [optional] [default to en_GB]
### Return type
[**InlineResponse200**](InlineResponse200.md)
### Authorization
[APIKeyHeader](../README.md#APIKeyHeader)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **translate_post**
> InlineResponse2001 translate_post(request=request)
Text translation
### Example
```python
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: APIKeyHeader
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.TranslateApi(swagger_client.ApiClient(configuration))
request = swagger_client.Request() # Request | (optional)
try:
# Text translation
api_response = api_instance.translate_post(request=request)
pprint(api_response)
except ApiException as e:
print("Exception when calling TranslateApi->translate_post: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**request** | [**Request**](Request.md)| | [optional]
### Return type
[**InlineResponse2001**](InlineResponse2001.md)
### Authorization
[APIKeyHeader](../README.md#APIKeyHeader)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)