| GET | /image | Returns the specified image based on the Id. | |
|---|---|---|---|
| GET | /image/{id} | Returns the specified image based on the Id. |
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
class SizeType(IntEnum):
UNKNOWN = 0
FULL = 1
SMALL = 2
MEDIUM = 3
LARGE = 4
X_LARGE = 5
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetImage:
# @ApiMember(DataType="int", IsRequired=true)
id: int = 0
# @ApiMember(Description="Manually control the server resizing of the image.")
image_size: Optional[SizeType] = None
"""
Manually control the server resizing of the image.
"""
# @ApiMember(DataType="boolean", Description="Set to true to return the image in Base64 format.")
base64: bool = False
"""
Set to true to return the image in Base64 format.
"""
# @ApiMember()
platform: Optional[str] = None
# @ApiMember(Description="Force this file to be returned as a thumbnail (small)")
thumbnail: bool = False
"""
Force this file to be returned as a thumbnail (small)
"""
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /image HTTP/1.1 Host: antel.api.dev.86degrees.com Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <z:anyType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" />