FBiHBetting.Aggregator.WebApi

<back to all web services

FindBettors

The following routes are available for this service:
GET/bettors
import 'package:servicestack/servicestack.dart';

class FindBettors implements IConvertible
{
    String? id;
    String? qry;
    int? currentPage;
    int? pageSize;

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

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

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

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

class ProductProvider implements IConvertible
{
    String? id;
    String? name;

    ProductProvider({this.id,this.name});
    ProductProvider.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        name = json['name'];
        return this;
    }

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

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

class PaginatedResult<T> implements IConvertible
{
    List<ProductProvider>? 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<ProductProvider>',context!);
        currentPage = json['currentPage'];
        pageSize = json['pageSize'];
        totalItems = json['totalItems'];
        totalPages = json['totalPages'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'data': JsonConverters.toJson(data,'List<ProductProvider>',context!),
        'currentPage': currentPage,
        'pageSize': pageSize,
        'totalItems': totalItems,
        'totalPages': totalPages
    };

    getTypeName() => "PaginatedResult<$T>";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'fbihtaapi.bettor.webhop.biz', types: <String, TypeInfo> {
    'FindBettors': TypeInfo(TypeOf.Class, create:() => FindBettors()),
    'ProductProvider': TypeInfo(TypeOf.Class, create:() => ProductProvider()),
    'PaginatedResult<T>': TypeInfo(TypeOf.Class, create:() => PaginatedResult<T>()),
    'List<ProductProvider>': TypeInfo(TypeOf.Class, create:() => <ProductProvider>[]),
});

Dart FindBettors DTOs

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

HTTP + JSV

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

GET /bettors HTTP/1.1 
Host: fbihtaapi.bettor.webhop.biz 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	data: 
	[
		{
			id: String,
			organizationTaxAuthorityId: String,
			fullName: String,
			dateOfBirth: 0001-01-01,
			jmbg: String,
			bettorAddress: 
			{
				street: String,
				city: 
				{
					id: String,
					value: String
				},
				postalCode: String
			},
			email: String,
			phoneNumber: String,
			username: String,
			bankTransactionAccountNumber: String,
			activationDate: 0001-01-01,
			bettorType: 0
		}
	],
	currentPage: 0,
	pageSize: 0,
	totalItems: 0,
	totalPages: 0
}