| All Verbs | /qry//metrics/e2e/slips/responses |
|---|
import 'package:servicestack/servicestack.dart';
class PaginatedQuery implements IConvertible
{
int? currentPage;
int? pageSize;
PaginatedQuery({this.currentPage,this.pageSize});
PaginatedQuery.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
currentPage = json['currentPage'];
pageSize = json['pageSize'];
return this;
}
Map<String, dynamic> toJson() => {
'currentPage': currentPage,
'pageSize': pageSize
};
getTypeName() => "PaginatedQuery";
TypeContext? context = _ctx;
}
class ResponseMetrics implements IConvertible
{
int? id;
int? rqc;
int? oc;
int? sc;
int? tc;
int? adr;
ResponseMetrics({this.id,this.rqc,this.oc,this.sc,this.tc,this.adr});
ResponseMetrics.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
rqc = json['rqc'];
oc = json['oc'];
sc = json['sc'];
tc = json['tc'];
adr = json['adr'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'rqc': rqc,
'oc': oc,
'sc': sc,
'tc': tc,
'adr': adr
};
getTypeName() => "ResponseMetrics";
TypeContext? context = _ctx;
}
class TimeResolution
{
static const TimeResolution Second = const TimeResolution._(1);
static const TimeResolution Minute = const TimeResolution._(2);
static const TimeResolution Hour = const TimeResolution._(5);
static const TimeResolution Day = const TimeResolution._(10);
final int _value;
const TimeResolution._(this._value);
int get value => _value;
static List<TimeResolution> get values => const [Second,Minute,Hour,Day];
}
class FindResponseMetrics extends PaginatedQuery implements IConvertible
{
TimeResolution? resolution;
int? timepointFrom;
int? timepointTo;
FindResponseMetrics({this.resolution,this.timepointFrom,this.timepointTo});
FindResponseMetrics.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
resolution = JsonConverters.fromJson(json['resolution'],'TimeResolution',context!);
timepointFrom = json['timepointFrom'];
timepointTo = json['timepointTo'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'resolution': JsonConverters.toJson(resolution,'TimeResolution',context!),
'timepointFrom': timepointFrom,
'timepointTo': timepointTo
});
getTypeName() => "FindResponseMetrics";
TypeContext? context = _ctx;
}
class PaginatedResult<T> implements IPaginatedResult, IConvertible
{
List<ResponseMetrics>? data = [];
int? currentPage;
int? pageSize;
int? totalItems;
int? totalPages;
PaginatedResult({this.data,this.currentPage,this.pageSize,this.totalItems,this.totalPages});
PaginatedResult.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
data = JsonConverters.fromJson(json['data'],'List<ResponseMetrics>',context!);
currentPage = json['currentPage'];
pageSize = json['pageSize'];
totalItems = json['totalItems'];
totalPages = json['totalPages'];
return this;
}
Map<String, dynamic> toJson() => {
'data': JsonConverters.toJson(data,'List<ResponseMetrics>',context!),
'currentPage': currentPage,
'pageSize': pageSize,
'totalItems': totalItems,
'totalPages': totalPages
};
getTypeName() => "PaginatedResult<$T>";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.sbbet.ath.cx', types: <String, TypeInfo> {
'PaginatedQuery': TypeInfo(TypeOf.Class, create:() => PaginatedQuery()),
'ResponseMetrics': TypeInfo(TypeOf.Class, create:() => ResponseMetrics()),
'TimeResolution': TypeInfo(TypeOf.Enum, enumValues:TimeResolution.values),
'FindResponseMetrics': TypeInfo(TypeOf.Class, create:() => FindResponseMetrics()),
'PaginatedResult<T>': TypeInfo(TypeOf.Class, create:() => PaginatedResult<T>()),
'List<ResponseMetrics>': TypeInfo(TypeOf.Class, create:() => <ResponseMetrics>[]),
});
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//metrics/e2e/slips/responses HTTP/1.1
Host: api.sbbet.ath.cx
Accept: application/json
Content-Type: application/json
Content-Length: length
{"resolution":1,"timepointFrom":0,"timepointTo":0,"currentPage":0,"pageSize":0}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"data":[{"id":0,"rqc":0,"oc":0,"sc":0,"tc":0,"adr":0}],"currentPage":0,"pageSize":0,"totalItems":0,"totalPages":0}