Booster.Microservices

<back to all web services

ArticleImageRequest

The following routes are available for this service:
GET/warranty/v1/article/{referenceId}/image/{format*}
import 'package:servicestack/servicestack.dart';

class BaseRequest<TResponse> implements IRequest, IConvertible
{
    String? sid;
    String? app;
    String? _os;
    String? _appVersion;
    String? _searchMethod;

    BaseRequest({this.sid,this.app,this._os,this._appVersion,this._searchMethod});
    BaseRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        sid = json['sid'];
        app = json['app'];
        _os = json['_os'];
        _appVersion = json['_appVersion'];
        _searchMethod = json['_searchMethod'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'sid': sid,
        'app': app,
        '_os': _os,
        '_appVersion': _appVersion,
        '_searchMethod': _searchMethod
    };

    getTypeName() => "BaseRequest<$TResponse>";
    TypeContext? context = _ctx;
}

class ArticleImageResponse implements IConvertible
{
    String? imageUrl;

    ArticleImageResponse({this.imageUrl});
    ArticleImageResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        imageUrl = json['imageUrl'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'imageUrl': imageUrl
    };

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

class ArticleImageRequest extends BaseRequest<ArticleImageResponse> implements IConvertible
{
    String? referenceId;
    String? format;

    ArticleImageRequest({this.referenceId,this.format});
    ArticleImageRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        referenceId = json['referenceId'];
        format = json['format'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'referenceId': referenceId,
        'format': format
    });

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

TypeContext _ctx = TypeContext(library: 'qp_microservices_booster.richemont.com', types: <String, TypeInfo> {
    'BaseRequest<TResponse>': TypeInfo(TypeOf.Class, create:() => BaseRequest<TResponse>()),
    'ArticleImageResponse': TypeInfo(TypeOf.Class, create:() => ArticleImageResponse()),
    'ArticleImageRequest': TypeInfo(TypeOf.Class, create:() => ArticleImageRequest()),
});

Dart ArticleImageRequest DTOs

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

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /warranty/v1/article/{referenceId}/image/{format*} HTTP/1.1 
Host: qp-microservices-booster.richemont.com 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"imageUrl":"String"}