| GET | /image | Returns the specified image based on the Id. | |
|---|---|---|---|
| GET | /image/{id} | Returns the specified image based on the Id. |
import 'package:servicestack/servicestack.dart';
class ImageSize
{
static const ImageSize Unknown = const ImageSize._(0);
static const ImageSize Full = const ImageSize._(1);
static const ImageSize Small = const ImageSize._(2);
static const ImageSize Medium = const ImageSize._(3);
static const ImageSize Large = const ImageSize._(4);
static const ImageSize XLarge = const ImageSize._(5);
final int _value;
const ImageSize._(this._value);
int get value => _value;
static List<ImageSize> get values => const [Unknown,Full,Small,Medium,Large,XLarge];
}
class GetImage implements IConvertible
{
// @ApiMember(DataType="int", IsRequired=true)
String? Id;
/**
* Manually control the server resizing of the image.
*/
// @ApiMember(Description="Manually control the server resizing of the image.")
ImageSize? ImageSize;
/**
* Set to true to return the image in Base64 format.
*/
// @ApiMember(DataType="boolean", Description="Set to true to return the image in Base64 format.")
bool? Base64;
// @ApiMember()
String? Platform;
/**
* Force this file to be returned as a thumbnail (small)
*/
// @ApiMember(Description="Force this file to be returned as a thumbnail (small)")
bool? Thumbnail;
GetImage({this.Id,this.ImageSize,this.Base64,this.Platform,this.Thumbnail});
GetImage.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
ImageSize = JsonConverters.fromJson(json['ImageSize'],'ImageSize',context!);
Base64 = json['Base64'];
Platform = json['Platform'];
Thumbnail = json['Thumbnail'];
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'ImageSize': JsonConverters.toJson(ImageSize,'ImageSize',context!),
'Base64': Base64,
'Platform': Platform,
'Thumbnail': Thumbnail
};
getTypeName() => "GetImage";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'returnit_api_dev.happen.zone', types: <String, TypeInfo> {
'ImageSize': TypeInfo(TypeOf.Enum, enumValues:ImageSize.values),
'GetImage': TypeInfo(TypeOf.Class, create:() => GetImage()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /image HTTP/1.1 Host: returnit-api-dev.happen.zone Accept: text/csv