| All Verbs | /qry/config/game |
|---|
import 'package:servicestack/servicestack.dart';
class CountdownConfiguration implements IConvertible
{
int? lockdownStepFromEnd;
int? assertLockdownStepFromEnd;
CountdownConfiguration({this.lockdownStepFromEnd,this.assertLockdownStepFromEnd});
CountdownConfiguration.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
lockdownStepFromEnd = json['lockdownStepFromEnd'];
assertLockdownStepFromEnd = json['assertLockdownStepFromEnd'];
return this;
}
Map<String, dynamic> toJson() => {
'lockdownStepFromEnd': lockdownStepFromEnd,
'assertLockdownStepFromEnd': assertLockdownStepFromEnd
};
getTypeName() => "CountdownConfiguration";
TypeContext? context = _ctx;
}
class DrawConfiguration implements IConvertible
{
int? introIntervalInMs;
int? animationIntervalInMs;
int? outroIntervalInMs;
DrawConfiguration({this.introIntervalInMs,this.animationIntervalInMs,this.outroIntervalInMs});
DrawConfiguration.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
introIntervalInMs = json['introIntervalInMs'];
animationIntervalInMs = json['animationIntervalInMs'];
outroIntervalInMs = json['outroIntervalInMs'];
return this;
}
Map<String, dynamic> toJson() => {
'introIntervalInMs': introIntervalInMs,
'animationIntervalInMs': animationIntervalInMs,
'outroIntervalInMs': outroIntervalInMs
};
getTypeName() => "DrawConfiguration";
TypeContext? context = _ctx;
}
class RTPStrategies
{
static const RTPStrategies RNG = const RTPStrategies._(0);
static const RTPStrategies Accumulator = const RTPStrategies._(1);
final int _value;
const RTPStrategies._(this._value);
int get value => _value;
static List<RTPStrategies> get values => const [RNG,Accumulator];
}
class HappyHourConfiguration implements IConvertible
{
bool? isHappyHour;
double? oddsModifier;
double? roundPoolBonusPct;
HappyHourConfiguration({this.isHappyHour,this.oddsModifier,this.roundPoolBonusPct});
HappyHourConfiguration.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
isHappyHour = json['isHappyHour'];
oddsModifier = JsonConverters.toDouble(json['oddsModifier']);
roundPoolBonusPct = JsonConverters.toDouble(json['roundPoolBonusPct']);
return this;
}
Map<String, dynamic> toJson() => {
'isHappyHour': isHappyHour,
'oddsModifier': oddsModifier,
'roundPoolBonusPct': roundPoolBonusPct
};
getTypeName() => "HappyHourConfiguration";
TypeContext? context = _ctx;
}
class RoundConfiguration implements IConvertible
{
RecordList<double>? coefficients;
bool? isDoubleTripleActive;
bool? isJackpot5Active;
int? countdownDurationInSeconds;
CountdownConfiguration? countdownConfiguration;
DrawConfiguration? drawConfiguration;
int? resultsDurationInSeconds;
RTPStrategies? rtpStrategy;
HappyHourConfiguration? happyHourConfiguration;
RoundConfiguration({this.coefficients,this.isDoubleTripleActive,this.isJackpot5Active,this.countdownDurationInSeconds,this.countdownConfiguration,this.drawConfiguration,this.resultsDurationInSeconds,this.rtpStrategy,this.happyHourConfiguration});
RoundConfiguration.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
coefficients = JsonConverters.fromJson(json['coefficients'],'RecordList<double>',context!);
isDoubleTripleActive = json['isDoubleTripleActive'];
isJackpot5Active = json['isJackpot5Active'];
countdownDurationInSeconds = json['countdownDurationInSeconds'];
countdownConfiguration = JsonConverters.fromJson(json['countdownConfiguration'],'CountdownConfiguration',context!);
drawConfiguration = JsonConverters.fromJson(json['drawConfiguration'],'DrawConfiguration',context!);
resultsDurationInSeconds = json['resultsDurationInSeconds'];
rtpStrategy = JsonConverters.fromJson(json['rtpStrategy'],'RTPStrategies',context!);
happyHourConfiguration = JsonConverters.fromJson(json['happyHourConfiguration'],'HappyHourConfiguration',context!);
return this;
}
Map<String, dynamic> toJson() => {
'coefficients': JsonConverters.toJson(coefficients,'RecordList<double>',context!),
'isDoubleTripleActive': isDoubleTripleActive,
'isJackpot5Active': isJackpot5Active,
'countdownDurationInSeconds': countdownDurationInSeconds,
'countdownConfiguration': JsonConverters.toJson(countdownConfiguration,'CountdownConfiguration',context!),
'drawConfiguration': JsonConverters.toJson(drawConfiguration,'DrawConfiguration',context!),
'resultsDurationInSeconds': resultsDurationInSeconds,
'rtpStrategy': JsonConverters.toJson(rtpStrategy,'RTPStrategies',context!),
'happyHourConfiguration': JsonConverters.toJson(happyHourConfiguration,'HappyHourConfiguration',context!)
};
getTypeName() => "RoundConfiguration";
TypeContext? context = _ctx;
}
class TimePoint implements IConvertible
{
int? hour;
int? minute;
TimePoint({this.hour,this.minute});
TimePoint.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
hour = json['hour'];
minute = json['minute'];
return this;
}
Map<String, dynamic> toJson() => {
'hour': hour,
'minute': minute
};
getTypeName() => "TimePoint";
TypeContext? context = _ctx;
}
class TimeInterval implements IConvertible
{
TimePoint? start;
TimePoint? end;
TimeInterval({this.start,this.end});
TimeInterval.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
start = JsonConverters.fromJson(json['start'],'TimePoint',context!);
end = JsonConverters.fromJson(json['end'],'TimePoint',context!);
return this;
}
Map<String, dynamic> toJson() => {
'start': JsonConverters.toJson(start,'TimePoint',context!),
'end': JsonConverters.toJson(end,'TimePoint',context!)
};
getTypeName() => "TimeInterval";
TypeContext? context = _ctx;
}
class HappyHourItem implements IConvertible
{
int? id;
TimeInterval? interval;
double? oddsModifier;
double? roundPoolBonusPct;
HappyHourItem({this.id,this.interval,this.oddsModifier,this.roundPoolBonusPct});
HappyHourItem.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
interval = JsonConverters.fromJson(json['interval'],'TimeInterval',context!);
oddsModifier = JsonConverters.toDouble(json['oddsModifier']);
roundPoolBonusPct = JsonConverters.toDouble(json['roundPoolBonusPct']);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'interval': JsonConverters.toJson(interval,'TimeInterval',context!),
'oddsModifier': oddsModifier,
'roundPoolBonusPct': roundPoolBonusPct
};
getTypeName() => "HappyHourItem";
TypeContext? context = _ctx;
}
class HappyHourConfig implements IConvertible
{
bool? isActive;
List<HappyHourItem>? items;
HappyHourConfig({this.isActive,this.items});
HappyHourConfig.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
isActive = json['isActive'];
items = JsonConverters.fromJson(json['items'],'List<HappyHourItem>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'isActive': isActive,
'items': JsonConverters.toJson(items,'List<HappyHourItem>',context!)
};
getTypeName() => "HappyHourConfig";
TypeContext? context = _ctx;
}
class GameConfiguration implements IConvertible
{
String? id;
int? queueSize;
RoundConfiguration? roundConfiguration;
HappyHourConfig? happyHourConfig;
GameConfiguration({this.id,this.queueSize,this.roundConfiguration,this.happyHourConfig});
GameConfiguration.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
queueSize = json['queueSize'];
roundConfiguration = JsonConverters.fromJson(json['roundConfiguration'],'RoundConfiguration',context!);
happyHourConfig = JsonConverters.fromJson(json['happyHourConfig'],'HappyHourConfig',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'queueSize': queueSize,
'roundConfiguration': JsonConverters.toJson(roundConfiguration,'RoundConfiguration',context!),
'happyHourConfig': JsonConverters.toJson(happyHourConfig,'HappyHourConfig',context!)
};
getTypeName() => "GameConfiguration";
TypeContext? context = _ctx;
}
class GetGameConfig implements IConvertible
{
String? locationId;
GetGameConfig({this.locationId});
GetGameConfig.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
locationId = json['locationId'];
return this;
}
Map<String, dynamic> toJson() => {
'locationId': locationId
};
getTypeName() => "GetGameConfig";
TypeContext? context = _ctx;
}
class RecordList<T> extends ListBase<T> implements IConvertible
{
final List<T> l = [];
set length(int newLength) { l.length = newLength; }
int get length => l.length;
T operator [](int index) => l[index];
void operator []=(int index, T value) { l[index] = value; }
RecordList();
RecordList.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "RecordList<$T>";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 's4w2.api.bettor.cc', types: <String, TypeInfo> {
'CountdownConfiguration': TypeInfo(TypeOf.Class, create:() => CountdownConfiguration()),
'DrawConfiguration': TypeInfo(TypeOf.Class, create:() => DrawConfiguration()),
'RTPStrategies': TypeInfo(TypeOf.Enum, enumValues:RTPStrategies.values),
'HappyHourConfiguration': TypeInfo(TypeOf.Class, create:() => HappyHourConfiguration()),
'RoundConfiguration': TypeInfo(TypeOf.Class, create:() => RoundConfiguration()),
'RecordList<double>': TypeInfo(TypeOf.Class, create:() => RecordList<double>()),
'TimePoint': TypeInfo(TypeOf.Class, create:() => TimePoint()),
'TimeInterval': TypeInfo(TypeOf.Class, create:() => TimeInterval()),
'HappyHourItem': TypeInfo(TypeOf.Class, create:() => HappyHourItem()),
'HappyHourConfig': TypeInfo(TypeOf.Class, create:() => HappyHourConfig()),
'List<HappyHourItem>': TypeInfo(TypeOf.Class, create:() => <HappyHourItem>[]),
'GameConfiguration': TypeInfo(TypeOf.Class, create:() => GameConfiguration()),
'GetGameConfig': TypeInfo(TypeOf.Class, create:() => GetGameConfig()),
'RecordList<T>': TypeInfo(TypeOf.GenericDef,create:() => RecordList()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /qry/config/game HTTP/1.1
Host: s4w2.api.bettor.cc
Accept: application/json
Content-Type: application/json
Content-Length: length
{"locationId":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"id":"String","queueSize":0,"roundConfiguration":{"coefficients":[0],"isDoubleTripleActive":false,"isJackpot5Active":false,"countdownDurationInSeconds":0,"countdownConfiguration":{"lockdownStepFromEnd":0,"assertLockdownStepFromEnd":0},"drawConfiguration":{"introIntervalInMs":0,"animationIntervalInMs":0,"outroIntervalInMs":0},"resultsDurationInSeconds":0,"rtpStrategy":0,"happyHourConfiguration":{"isHappyHour":false,"oddsModifier":0,"roundPoolBonusPct":0}},"happyHourConfig":{"isActive":false,"items":[{"id":0,"interval":{"start":{"hour":0,"minute":0},"end":{"hour":0,"minute":0}},"oddsModifier":0,"roundPoolBonusPct":0}]}}