| All Verbs | /qry/feed/hb |
|---|
import 'package:servicestack/servicestack.dart';
class Stages
{
static const Stages None = const Stages._(0);
static const Stages Countdown = const Stages._(1);
static const Stages Processing = const Stages._(2);
static const Stages Draw = const Stages._(3);
static const Stages Results = const Stages._(4);
final int _value;
const Stages._(this._value);
int get value => _value;
static List<Stages> get values => const [None,Countdown,Processing,Draw,Results];
}
class Progress implements IConvertible
{
int? step;
int? steps;
double? pct;
Progress({this.step,this.steps,this.pct});
Progress.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
step = json['step'];
steps = json['steps'];
pct = JsonConverters.toDouble(json['pct']);
return this;
}
Map<String, dynamic> toJson() => {
'step': step,
'steps': steps,
'pct': pct
};
getTypeName() => "Progress";
TypeContext? context = _ctx;
}
class FeedHeartbeat implements IConvertible
{
String? roundId;
Stages? stage;
int? step;
int? steps;
DateTime? utcTimestamp;
int? lockdownStepFromEnd;
Progress? overall;
bool? isHappyHour;
FeedHeartbeat({this.roundId,this.stage,this.step,this.steps,this.utcTimestamp,this.lockdownStepFromEnd,this.overall,this.isHappyHour});
FeedHeartbeat.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
roundId = json['roundId'];
stage = JsonConverters.fromJson(json['stage'],'Stages',context!);
step = json['step'];
steps = json['steps'];
utcTimestamp = JsonConverters.fromJson(json['utcTimestamp'],'DateTime',context!);
lockdownStepFromEnd = json['lockdownStepFromEnd'];
overall = JsonConverters.fromJson(json['overall'],'Progress',context!);
isHappyHour = json['isHappyHour'];
return this;
}
Map<String, dynamic> toJson() => {
'roundId': roundId,
'stage': JsonConverters.toJson(stage,'Stages',context!),
'step': step,
'steps': steps,
'utcTimestamp': JsonConverters.toJson(utcTimestamp,'DateTime',context!),
'lockdownStepFromEnd': lockdownStepFromEnd,
'overall': JsonConverters.toJson(overall,'Progress',context!),
'isHappyHour': isHappyHour
};
getTypeName() => "FeedHeartbeat";
TypeContext? context = _ctx;
}
class GetFeedHeartbeat implements IConvertible
{
GetFeedHeartbeat();
GetFeedHeartbeat.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "GetFeedHeartbeat";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 's4w2.api.bettor.cc', types: <String, TypeInfo> {
'Stages': TypeInfo(TypeOf.Enum, enumValues:Stages.values),
'Progress': TypeInfo(TypeOf.Class, create:() => Progress()),
'FeedHeartbeat': TypeInfo(TypeOf.Class, create:() => FeedHeartbeat()),
'GetFeedHeartbeat': TypeInfo(TypeOf.Class, create:() => GetFeedHeartbeat()),
});
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.
POST /qry/feed/hb HTTP/1.1
Host: s4w2.api.bettor.cc
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
roundId: String,
stage: 0,
step: 0,
steps: 0,
utcTimestamp: 0001-01-01,
lockdownStepFromEnd: 0,
overall:
{
step: 0,
steps: 0,
pct: 0
},
isHappyHour: False
}