Six4Win.WebApi

<back to all web services

GetAccumulator

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

class Pool implements IConvertible
{
    int? id;
    String? name;
    double? coefficient;
    double? rtp;
    double? threshold;
    double? balance;
    double? rrtp;
    double? rBalance;

    Pool({this.id,this.name,this.coefficient,this.rtp,this.threshold,this.balance,this.rrtp,this.rBalance});
    Pool.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        name = json['name'];
        coefficient = JsonConverters.toDouble(json['coefficient']);
        rtp = JsonConverters.toDouble(json['rtp']);
        threshold = JsonConverters.toDouble(json['threshold']);
        balance = JsonConverters.toDouble(json['balance']);
        rrtp = JsonConverters.toDouble(json['rrtp']);
        rBalance = JsonConverters.toDouble(json['rBalance']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'name': name,
        'coefficient': coefficient,
        'rtp': rtp,
        'threshold': threshold,
        'balance': balance,
        'rrtp': rrtp,
        'rBalance': rBalance
    };

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

class Accumulator implements IConvertible
{
    List<Pool>? pools;
    double? rtp;

    Accumulator({this.pools,this.rtp});
    Accumulator.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        pools = JsonConverters.fromJson(json['pools'],'List<Pool>',context!);
        rtp = JsonConverters.toDouble(json['rtp']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'pools': JsonConverters.toJson(pools,'List<Pool>',context!),
        'rtp': rtp
    };

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

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

    Map<String, dynamic> toJson() => {};
    getTypeName() => "GetAccumulator";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 's4w2.api.bettor.cc', types: <String, TypeInfo> {
    'Pool': TypeInfo(TypeOf.Class, create:() => Pool()),
    'Accumulator': TypeInfo(TypeOf.Class, create:() => Accumulator()),
    'List<Pool>': TypeInfo(TypeOf.Class, create:() => <Pool>[]),
    'GetAccumulator': TypeInfo(TypeOf.Class, create:() => GetAccumulator()),
});

Dart GetAccumulator DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

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

POST /qry/accumulator HTTP/1.1 
Host: s4w2.api.bettor.cc 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"pools":[{"id":0,"name":"String","coefficient":0,"rtp":0,"threshold":0,"balance":0,"rrtp":0,"rBalance":0}],"rtp":0}