| 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 .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/feed/hb HTTP/1.1
Host: s4w2.api.bettor.cc
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<GetFeedHeartbeat 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
<FeedHeartbeat xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Six4Win.ReadModel">
<IsHappyHour>false</IsHappyHour>
<LockdownStepFromEnd>0</LockdownStepFromEnd>
<Overall>
<Pct>0</Pct>
<Step>0</Step>
<Steps>0</Steps>
</Overall>
<RoundId>String</RoundId>
<Stage>None</Stage>
<Step>0</Step>
<Steps>0</Steps>
<UTCTimestamp>0001-01-01T00:00:00</UTCTimestamp>
</FeedHeartbeat>