API bindings for the Lilt REST API.
All URIs are relative to https://api.lilt.com
Method | HTTP request | Description |
---|---|---|
get_languages | GET /v2/languages | Retrieve supported languages |
LanguagesResponse get_languages()
Retrieve supported languages
Get a list of supported languages.
import lilt
from lilt.models.languages_response import LanguagesResponse
from lilt.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.lilt.com
# See configuration.py for a list of all supported configuration parameters.
configuration = lilt.Configuration(
host = "https://api.lilt.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: BasicAuth
configuration = lilt.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with lilt.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = lilt.LanguagesApi(api_client)
try:
# Retrieve supported languages
api_response = api_instance.get_languages()
print("The response of LanguagesApi->get_languages:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling LanguagesApi->get_languages: %s\n" % e)
This endpoint does not need any parameter.
Status code | Description | Response headers |
---|---|---|
200 | An object listing supported languages and their corresponding locales. | - |
401 | Unauthorized | - |
0 | Unexpected error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]