| All Verbs | /qry/feed/locations |
|---|
import 'package:servicestack/servicestack.dart';
class CurrentRoundInfo implements IConvertible
{
String? roundId;
double? amount;
String? inertCode;
CurrentRoundInfo({this.roundId,this.amount,this.inertCode});
CurrentRoundInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
roundId = json['roundId'];
amount = JsonConverters.toDouble(json['amount']);
inertCode = json['inertCode'];
return this;
}
Map<String, dynamic> toJson() => {
'roundId': roundId,
'amount': amount,
'inertCode': inertCode
};
getTypeName() => "CurrentRoundInfo";
TypeContext? context = _ctx;
}
class BettingApp implements IConvertible
{
String? name;
String? version;
BettingApp({this.name,this.version});
BettingApp.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
name = json['name'];
version = json['version'];
return this;
}
Map<String, dynamic> toJson() => {
'name': name,
'version': version
};
getTypeName() => "BettingApp";
TypeContext? context = _ctx;
}
class Ref implements IConvertible
{
String? id;
String? val;
Ref({this.id,this.val});
Ref.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
val = json['val'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'val': val
};
getTypeName() => "Ref";
TypeContext? context = _ctx;
}
class RefEx extends Ref implements IConvertible
{
RecordDictionary<String,String>? data;
RefEx({this.data});
RefEx.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
data = JsonConverters.fromJson(json['data'],'RecordDictionary<String,String>',context!);
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'data': JsonConverters.toJson(data,'RecordDictionary<String,String>',context!)
});
getTypeName() => "RefEx";
TypeContext? context = _ctx;
}
class Origin implements IConvertible
{
BettingApp? application;
String? ip;
RefEx? organization;
Ref? region;
Ref? locationGroup;
RefEx? location;
RefEx? device;
Ref? clerk;
Origin({this.application,this.ip,this.organization,this.region,this.locationGroup,this.location,this.device,this.clerk});
Origin.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
application = JsonConverters.fromJson(json['application'],'BettingApp',context!);
ip = json['ip'];
organization = JsonConverters.fromJson(json['organization'],'RefEx',context!);
region = JsonConverters.fromJson(json['region'],'Ref',context!);
locationGroup = JsonConverters.fromJson(json['locationGroup'],'Ref',context!);
location = JsonConverters.fromJson(json['location'],'RefEx',context!);
device = JsonConverters.fromJson(json['device'],'RefEx',context!);
clerk = JsonConverters.fromJson(json['clerk'],'Ref',context!);
return this;
}
Map<String, dynamic> toJson() => {
'application': JsonConverters.toJson(application,'BettingApp',context!),
'ip': ip,
'organization': JsonConverters.toJson(organization,'RefEx',context!),
'region': JsonConverters.toJson(region,'Ref',context!),
'locationGroup': JsonConverters.toJson(locationGroup,'Ref',context!),
'location': JsonConverters.toJson(location,'RefEx',context!),
'device': JsonConverters.toJson(device,'RefEx',context!),
'clerk': JsonConverters.toJson(clerk,'Ref',context!)
};
getTypeName() => "Origin";
TypeContext? context = _ctx;
}
class WinnerByCode implements IConvertible
{
String? roundId;
DateTime? drawnAtUtc;
String? slipId;
String? betId;
String? code;
double? amount;
Origin? origin;
Ref? bettor;
String? locationAddressOrBettorInfo;
WinnerByCode({this.roundId,this.drawnAtUtc,this.slipId,this.betId,this.code,this.amount,this.origin,this.bettor,this.locationAddressOrBettorInfo});
WinnerByCode.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
roundId = json['roundId'];
drawnAtUtc = JsonConverters.fromJson(json['drawnAtUtc'],'DateTime',context!);
slipId = json['slipId'];
betId = json['betId'];
code = json['code'];
amount = JsonConverters.toDouble(json['amount']);
origin = JsonConverters.fromJson(json['origin'],'Origin',context!);
bettor = JsonConverters.fromJson(json['bettor'],'Ref',context!);
locationAddressOrBettorInfo = json['locationAddressOrBettorInfo'];
return this;
}
Map<String, dynamic> toJson() => {
'roundId': roundId,
'drawnAtUtc': JsonConverters.toJson(drawnAtUtc,'DateTime',context!),
'slipId': slipId,
'betId': betId,
'code': code,
'amount': amount,
'origin': JsonConverters.toJson(origin,'Origin',context!),
'bettor': JsonConverters.toJson(bettor,'Ref',context!),
'locationAddressOrBettorInfo': locationAddressOrBettorInfo
};
getTypeName() => "WinnerByCode";
TypeContext? context = _ctx;
}
class LocalCodePotInfo implements IConvertible
{
bool? isActive;
CurrentRoundInfo? current;
List<WinnerByCode>? winners;
LocalCodePotInfo({this.isActive,this.current,this.winners});
LocalCodePotInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
isActive = json['isActive'];
current = JsonConverters.fromJson(json['current'],'CurrentRoundInfo',context!);
winners = JsonConverters.fromJson(json['winners'],'List<WinnerByCode>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'isActive': isActive,
'current': JsonConverters.toJson(current,'CurrentRoundInfo',context!),
'winners': JsonConverters.toJson(winners,'List<WinnerByCode>',context!)
};
getTypeName() => "LocalCodePotInfo";
TypeContext? context = _ctx;
}
class LocationFeed implements IConvertible
{
bool? exists;
String? id;
LocalCodePotInfo? lcpInfo;
LocationFeed({this.exists,this.id,this.lcpInfo});
LocationFeed.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
exists = json['exists'];
id = json['id'];
lcpInfo = JsonConverters.fromJson(json['lcpInfo'],'LocalCodePotInfo',context!);
return this;
}
Map<String, dynamic> toJson() => {
'exists': exists,
'id': id,
'lcpInfo': JsonConverters.toJson(lcpInfo,'LocalCodePotInfo',context!)
};
getTypeName() => "LocationFeed";
TypeContext? context = _ctx;
}
class GetLocationFeed implements IConvertible
{
String? id;
GetLocationFeed({this.id});
GetLocationFeed.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id
};
getTypeName() => "GetLocationFeed";
TypeContext? context = _ctx;
}
class RecordDictionary<TKey,TVal> extends Map<TKey,TVal?> implements IConvertible
{
RecordDictionary();
RecordDictionary.fromJson(Map<String, dynamic> json) : super.fromJson(json);
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
return this;
}
Map<String, dynamic> toJson() => super.toJson();
getTypeName() => "RecordDictionary<$TKey,$TVal>";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 's4w2.api.bettor.cc', types: <String, TypeInfo> {
'CurrentRoundInfo': TypeInfo(TypeOf.Class, create:() => CurrentRoundInfo()),
'BettingApp': TypeInfo(TypeOf.Class, create:() => BettingApp()),
'Ref': TypeInfo(TypeOf.Class, create:() => Ref()),
'RefEx': TypeInfo(TypeOf.Class, create:() => RefEx()),
'RecordDictionary<String,String>': TypeInfo(TypeOf.Class, create:() => RecordDictionary<String,String>()),
'Origin': TypeInfo(TypeOf.Class, create:() => Origin()),
'WinnerByCode': TypeInfo(TypeOf.Class, create:() => WinnerByCode()),
'LocalCodePotInfo': TypeInfo(TypeOf.Class, create:() => LocalCodePotInfo()),
'List<WinnerByCode>': TypeInfo(TypeOf.Class, create:() => <WinnerByCode>[]),
'LocationFeed': TypeInfo(TypeOf.Class, create:() => LocationFeed()),
'GetLocationFeed': TypeInfo(TypeOf.Class, create:() => GetLocationFeed()),
'RecordDictionary<TKey,TVal>': TypeInfo(TypeOf.GenericDef,create:() => RecordDictionary()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /qry/feed/locations HTTP/1.1
Host: s4w2.api.bettor.cc
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"id":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"exists":false,"id":"String","lcpInfo":{"isActive":false,"current":{"roundId":"String","amount":0,"inertCode":"String"},"winners":[{"roundId":"String","drawnAtUtc":"0001-01-01T00:00:00.0000000Z","slipId":"String","betId":"String","code":"String","amount":0,"origin":{"application":{"name":"String","version":"String"},"ip":"String","organization":{"data":{"String":"String"},"id":"String","val":"String"},"region":{"id":"String","val":"String"},"locationGroup":{"id":"String","val":"String"},"location":{"data":{"String":"String"},"id":"String","val":"String"},"device":{"data":{"String":"String"},"id":"String","val":"String"},"clerk":{"id":"String","val":"String"}},"bettor":{"id":"String","val":"String"},"locationAddressOrBettorInfo":"String"}]}}