| GET | /qry/configurations/thresholds/custom |
|---|
import 'package:servicestack/servicestack.dart';
class Pool implements IConvertible
{
int? id;
String? name;
double? coefficient;
double? rtp;
double? threshold;
double? balance;
double? rrtp;
double? rBalance;
Pool({this.id,this.name,this.coefficient,this.rtp,this.threshold,this.balance,this.rrtp,this.rBalance});
Pool.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
coefficient = JsonConverters.toDouble(json['coefficient']);
rtp = JsonConverters.toDouble(json['rtp']);
threshold = JsonConverters.toDouble(json['threshold']);
balance = JsonConverters.toDouble(json['balance']);
rrtp = JsonConverters.toDouble(json['rrtp']);
rBalance = JsonConverters.toDouble(json['rBalance']);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'coefficient': coefficient,
'rtp': rtp,
'threshold': threshold,
'balance': balance,
'rrtp': rrtp,
'rBalance': rBalance
};
getTypeName() => "Pool";
TypeContext? context = _ctx;
}
class CustomThresholds implements IConvertible
{
String? id;
List<Pool>? pools;
CustomThresholds({this.id,this.pools});
CustomThresholds.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
pools = JsonConverters.fromJson(json['pools'],'List<Pool>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'pools': JsonConverters.toJson(pools,'List<Pool>',context!)
};
getTypeName() => "CustomThresholds";
TypeContext? context = _ctx;
}
class GetCustomThresholds implements IConvertible
{
GetCustomThresholds();
GetCustomThresholds.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "GetCustomThresholds";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 's4w2.api.bettor.cc', types: <String, TypeInfo> {
'Pool': TypeInfo(TypeOf.Class, create:() => Pool()),
'CustomThresholds': TypeInfo(TypeOf.Class, create:() => CustomThresholds()),
'List<Pool>': TypeInfo(TypeOf.Class, create:() => <Pool>[]),
'GetCustomThresholds': TypeInfo(TypeOf.Class, create:() => GetCustomThresholds()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /qry/configurations/thresholds/custom HTTP/1.1 Host: s4w2.api.bettor.cc Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
id: String,
pools:
[
{
id: 0,
name: String,
treshold: 0
}
]
}