All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| generate_thumbnail_converter_thumbnail_post | POST /converter/thumbnail | Generate Thumbnail |
bytes generate_thumbnail_converter_thumbnail_post(file, width=width, height=height, color=color, strategy=strategy)
Generate Thumbnail
import mandolin_python_client
from mandolin_python_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = mandolin_python_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with mandolin_python_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = mandolin_python_client.ConvertersApi(api_client)
file = None # bytes |
width = 300 # int | (optional) (default to 300)
height = 200 # int | (optional) (default to 200)
color = 'color_example' # str | (optional)
strategy = mandolin_python_client.ThumbnailStrategy() # ThumbnailStrategy | (optional)
try:
# Generate Thumbnail
api_response = api_instance.generate_thumbnail_converter_thumbnail_post(file, width=width, height=height, color=color, strategy=strategy)
print("The response of ConvertersApi->generate_thumbnail_converter_thumbnail_post:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ConvertersApi->generate_thumbnail_converter_thumbnail_post: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| file | bytes | ||
| width | int | [optional] [default to 300] | |
| height | int | [optional] [default to 200] | |
| color | str | [optional] | |
| strategy | ThumbnailStrategy | [optional] |
bytes
No authorization required
- Content-Type: multipart/form-data
- Accept: image/png, application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Stream the thumbnail of the given image. | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]