| All Verbs | /qry/stats/last10 |
|---|
import 'package:servicestack/servicestack.dart';
class Rating implements IConvertible
{
int? val;
int? count;
Rating({this.val,this.count});
Rating.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
val = json['val'];
count = json['count'];
return this;
}
Map<String, dynamic> toJson() => {
'val': val,
'count': count
};
getTypeName() => "Rating";
TypeContext? context = _ctx;
}
class Comparison implements IConvertible
{
int? v1;
int? v2;
double? p1;
double? p2;
Comparison({this.v1,this.v2,this.p1,this.p2});
Comparison.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
v1 = json['v1'];
v2 = json['v2'];
p1 = JsonConverters.toDouble(json['p1']);
p2 = JsonConverters.toDouble(json['p2']);
return this;
}
Map<String, dynamic> toJson() => {
'v1': v1,
'v2': v2,
'p1': p1,
'p2': p2
};
getTypeName() => "Comparison";
TypeContext? context = _ctx;
}
class LastRoundsStats implements IConvertible
{
String? id;
List<int>? topSix;
List<int>? bottomSix;
List<Rating>? topFirstColors;
List<Rating>? topColors;
Comparison? firstNrEvenVsOdd;
Comparison? firstNrLessVsGreater24_5;
Comparison? sumOfFirstFiveLessVsGreaterThan122_5;
Comparison? totalEvenVsOdd;
LastRoundsStats({this.id,this.topSix,this.bottomSix,this.topFirstColors,this.topColors,this.firstNrEvenVsOdd,this.firstNrLessVsGreater24_5,this.sumOfFirstFiveLessVsGreaterThan122_5,this.totalEvenVsOdd});
LastRoundsStats.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
topSix = JsonConverters.fromJson(json['topSix'],'List<int>',context!);
bottomSix = JsonConverters.fromJson(json['bottomSix'],'List<int>',context!);
topFirstColors = JsonConverters.fromJson(json['topFirstColors'],'List<Rating>',context!);
topColors = JsonConverters.fromJson(json['topColors'],'List<Rating>',context!);
firstNrEvenVsOdd = JsonConverters.fromJson(json['firstNrEvenVsOdd'],'Comparison',context!);
firstNrLessVsGreater24_5 = JsonConverters.fromJson(json['firstNrLessVsGreater24_5'],'Comparison',context!);
sumOfFirstFiveLessVsGreaterThan122_5 = JsonConverters.fromJson(json['sumOfFirstFiveLessVsGreaterThan122_5'],'Comparison',context!);
totalEvenVsOdd = JsonConverters.fromJson(json['totalEvenVsOdd'],'Comparison',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'topSix': JsonConverters.toJson(topSix,'List<int>',context!),
'bottomSix': JsonConverters.toJson(bottomSix,'List<int>',context!),
'topFirstColors': JsonConverters.toJson(topFirstColors,'List<Rating>',context!),
'topColors': JsonConverters.toJson(topColors,'List<Rating>',context!),
'firstNrEvenVsOdd': JsonConverters.toJson(firstNrEvenVsOdd,'Comparison',context!),
'firstNrLessVsGreater24_5': JsonConverters.toJson(firstNrLessVsGreater24_5,'Comparison',context!),
'sumOfFirstFiveLessVsGreaterThan122_5': JsonConverters.toJson(sumOfFirstFiveLessVsGreaterThan122_5,'Comparison',context!),
'totalEvenVsOdd': JsonConverters.toJson(totalEvenVsOdd,'Comparison',context!)
};
getTypeName() => "LastRoundsStats";
TypeContext? context = _ctx;
}
class GetLastRoundsStats implements IConvertible
{
GetLastRoundsStats();
GetLastRoundsStats.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "GetLastRoundsStats";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 's4w2.api.bettor.cc', types: <String, TypeInfo> {
'Rating': TypeInfo(TypeOf.Class, create:() => Rating()),
'Comparison': TypeInfo(TypeOf.Class, create:() => Comparison()),
'LastRoundsStats': TypeInfo(TypeOf.Class, create:() => LastRoundsStats()),
'List<Rating>': TypeInfo(TypeOf.Class, create:() => <Rating>[]),
'GetLastRoundsStats': TypeInfo(TypeOf.Class, create:() => GetLastRoundsStats()),
});
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/stats/last10 HTTP/1.1
Host: s4w2.api.bettor.cc
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<GetLastRoundsStats xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Six4Win.WebApi.ServiceModel" />
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<LastRoundsStats xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Six4Win.ReadModel.Stats">
<BottomSix xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:int>0</d2p1:int>
</BottomSix>
<FirstNrEvenVsOdd>
<V1>0</V1>
<V2>0</V2>
</FirstNrEvenVsOdd>
<FirstNrLessVsGreater24_5>
<V1>0</V1>
<V2>0</V2>
</FirstNrLessVsGreater24_5>
<Id>String</Id>
<SumOfFirstFiveLessVsGreaterThan122_5>
<V1>0</V1>
<V2>0</V2>
</SumOfFirstFiveLessVsGreaterThan122_5>
<TopColors>
<LastRoundsStats.Rating>
<Count>0</Count>
<Val>0</Val>
</LastRoundsStats.Rating>
</TopColors>
<TopFirstColors>
<LastRoundsStats.Rating>
<Count>0</Count>
<Val>0</Val>
</LastRoundsStats.Rating>
</TopFirstColors>
<TopSix xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:int>0</d2p1:int>
</TopSix>
<TotalEvenVsOdd>
<V1>0</V1>
<V2>0</V2>
</TotalEvenVsOdd>
</LastRoundsStats>