| All Verbs | /qry/lookups |
|---|
import 'package:servicestack/servicestack.dart';
class LookupItem implements IConvertible
{
String? id;
String? value;
String? tag;
LookupItem({this.id,this.value,this.tag});
LookupItem.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
value = json['value'];
tag = json['tag'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'value': value,
'tag': tag
};
getTypeName() => "LookupItem";
TypeContext? context = _ctx;
}
class Lookup implements IConvertible
{
String? id;
List<LookupItem>? data;
Lookup({this.id,this.data});
Lookup.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
data = JsonConverters.fromJson(json['data'],'List<LookupItem>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'data': JsonConverters.toJson(data,'List<LookupItem>',context!)
};
getTypeName() => "Lookup";
TypeContext? context = _ctx;
}
class GetLookup implements IConvertible
{
String? id;
GetLookup({this.id});
GetLookup.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id
};
getTypeName() => "GetLookup";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 's4w2.api.bettor.cc', types: <String, TypeInfo> {
'LookupItem': TypeInfo(TypeOf.Class, create:() => LookupItem()),
'Lookup': TypeInfo(TypeOf.Class, create:() => Lookup()),
'List<LookupItem>': TypeInfo(TypeOf.Class, create:() => <LookupItem>[]),
'GetLookup': TypeInfo(TypeOf.Class, create:() => GetLookup()),
});
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.
POST /qry/lookups HTTP/1.1
Host: s4w2.api.bettor.cc
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<GetLookup xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Six4Win.WebApi.ServiceModel">
<Id>String</Id>
</GetLookup>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<Lookup xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Six4Win.ReadModel">
<Data>
<LookupItem>
<Id>String</Id>
<Tag>String</Tag>
<Value>String</Value>
</LookupItem>
</Data>
<Id>String</Id>
</Lookup>