Antel API

<back to all web services

GetImage

The following routes are available for this service:
GET/imageReturns 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;

    // @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'],'SizeType',context!);
        base64 = json['base64'];
        platform = json['platform'];
        thumbnail = json['thumbnail'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'imageSize': JsonConverters.toJson(imageSize,'SizeType',context!),
        'base64': base64,
        'platform': platform,
        'thumbnail': thumbnail
    };

    getTypeName() => "GetImage";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'antel.api.dev.86degrees.com', types: <String, TypeInfo> {
    'SizeType': TypeInfo(TypeOf.Enum, enumValues:SizeType.values),
    'GetImage': TypeInfo(TypeOf.Class, create:() => GetImage()),
});

Dart GetImage DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + 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/" />