Betting.WebApi

<back to all web services

FindGroupTotalsByPeriod

The following routes are available for this service:
All Verbs/qry/totals/group/period
import 'package:servicestack/servicestack.dart';

class QueryRequest implements IConvertible
{
    Map<String,String?>? qry = {};

    QueryRequest({this.qry});
    QueryRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        qry = JsonConverters.toStringMap(json['qry']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'qry': qry
    };

    getTypeName() => "QueryRequest";
    TypeContext? context = _ctx;
}

class PaginatedQueryRequest extends QueryRequest implements IConvertible
{
    int? currentPage;
    int? pageSize;

    PaginatedQueryRequest({this.currentPage,this.pageSize});
    PaginatedQueryRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        currentPage = json['currentPage'];
        pageSize = json['pageSize'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'currentPage': currentPage,
        'pageSize': pageSize
    });

    getTypeName() => "PaginatedQueryRequest";
    TypeContext? context = _ctx;
}

class FindGroupTotalsByPeriod extends PaginatedQueryRequest implements IConvertible
{
    FindGroupTotalsByPeriod();
    FindGroupTotalsByPeriod.fromJson(Map<String, dynamic> json) : super.fromJson(json);
    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson();
    getTypeName() => "FindGroupTotalsByPeriod";
    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 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> {
    'QueryRequest': TypeInfo(TypeOf.Class, create:() => QueryRequest()),
    'PaginatedQueryRequest': TypeInfo(TypeOf.Class, create:() => PaginatedQueryRequest()),
    'FindGroupTotalsByPeriod': TypeInfo(TypeOf.Class, create:() => FindGroupTotalsByPeriod()),
    'ResponseMetrics': TypeInfo(TypeOf.Class, create:() => ResponseMetrics()),
    'PaginatedResult<T>': TypeInfo(TypeOf.Class, create:() => PaginatedResult<T>()),
    'List<ResponseMetrics>': TypeInfo(TypeOf.Class, create:() => <ResponseMetrics>[]),
});

Dart FindGroupTotalsByPeriod DTOs

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

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /qry/totals/group/period HTTP/1.1 
Host: api.sbbet.ath.cx 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"currentPage":0,"pageSize":0,"qry":{"String":"String"}}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"data":[{"id":"String","name":"String","cancelationInfo":{"count":0,"amount":0},"reversionInfo":{"count":0,"amount":0},"voidInfo":{"count":0,"amount":0},"payinInfo":{"betCount":0,"payin":0,"tax":0,"stake":0},"payoutSummary":{"realized":{"betCount":0,"winnings":0,"tax":0,"payout":0},"paidOut":{"betCount":0,"winnings":0,"tax":0,"payout":0},"expired":{"betCount":0,"winnings":0,"tax":0,"payout":0},"pending":{"betCount":0,"winnings":0,"tax":0,"payout":0}},"balanceSummary":{"realized":{"balance":0,"profitPct":0},"paidOut":{"balance":0,"profitPct":0}}}],"currentPage":0,"pageSize":0,"totalItems":0,"totalPages":0}