Richemont.Booster2.PublicApi

<back to all web services

GetLanguages

Requires Authentication
The following routes are available for this service:
GET/languagesGet all available languages
import 'package:servicestack/servicestack.dart';

class Language implements IConvertible
{
    /**
    * Booster ID of the language
    */
    // @ApiMember(Description="Booster ID of the language", IsRequired=true)
    String? languageId;

    /**
    * Description of the language
    */
    // @ApiMember(Description="Description of the language", IsRequired=true)
    String? description;

    /**
    * Language description translation
    */
    // @ApiMember(Description="Language description translation", IsRequired=true)
    String? translation;

    Language({this.languageId,this.description,this.translation});
    Language.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'languageId': languageId,
        'description': description,
        'translation': translation
    };

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

class GetLanguagesResponse extends ListBase<Language> implements IConvertible
{
    final List<Language> l = [];
    set length(int newLength) { l.length = newLength; }
    int get length => l.length;
    Language operator [](int index) => l[index];
    void operator []=(int index, Language value) { l[index] = value; }
    GetLanguagesResponse();
    GetLanguagesResponse.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "GetLanguagesResponse";
    TypeContext? context = _ctx;
}

class GetLanguages implements IConvertible
{
    GetLanguages();
    GetLanguages.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "GetLanguages";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'dev_api_booster.richemont.com', types: <String, TypeInfo> {
    'Language': TypeInfo(TypeOf.Class, create:() => Language()),
    'GetLanguagesResponse': TypeInfo(TypeOf.Class, create:() => GetLanguagesResponse()),
    'GetLanguages': TypeInfo(TypeOf.Class, create:() => GetLanguages()),
});

Dart GetLanguages DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

GET /languages HTTP/1.1 
Host: dev-api-booster.richemont.com 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

[]