| GET | /languages | Get 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()),
});
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 /languages HTTP/1.1 Host: dev-api-booster.richemont.com Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <ArrayOfLanguage xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.CRM.ServiceModel" />