| 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 SizeType
{
static const SizeType Unknown = const SizeType._(0);
static const SizeType Full = const SizeType._(1);
static const SizeType Small = const SizeType._(2);
static const SizeType Medium = const SizeType._(3);
static const SizeType Large = const SizeType._(4);
static const SizeType XLarge = const SizeType._(5);
final int _value;
const SizeType._(this._value);
int get value => _value;
static List<SizeType> get values => const [Unknown,Full,Small,Medium,Large,XLarge];
}
class GetImage implements IConvertible
{
// @ApiMember(DataType="int", IsRequired=true)
int? Id;
/**
* Manually control the server resizing of the image.
*/
// @ApiMember(Description="Manually control the server resizing of the image.")
SizeType? 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;
/**
* 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.Thumbnail});
GetImage.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
ImageSize = JsonConverters.fromJson(json['ImageSize'],'SizeType',context!);
Base64 = json['Base64'];
Thumbnail = json['Thumbnail'];
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'ImageSize': JsonConverters.toJson(ImageSize,'SizeType',context!),
'Base64': Base64,
'Thumbnail': Thumbnail
};
getTypeName() => "GetImage";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'galaxymobile.api.dev.86degrees.com', types: <String, TypeInfo> {
'SizeType': TypeInfo(TypeOf.Enum, enumValues:SizeType.values),
'GetImage': TypeInfo(TypeOf.Class, create:() => GetImage()),
});
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: galaxymobile.api.dev.86degrees.com Accept: application/xml