FBiHBetting.Aggregator.WebApi

<back to all web services

FindLocations

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

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

    FindLocations({this.id,this.qry,this.currentPage,this.pageSize});
    FindLocations.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() => "FindLocations";
    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> {
    'FindLocations': TypeInfo(TypeOf.Class, create:() => FindLocations()),
    'ProductProvider': TypeInfo(TypeOf.Class, create:() => ProductProvider()),
    'PaginatedResult<T>': TypeInfo(TypeOf.Class, create:() => PaginatedResult<T>()),
    'List<ProductProvider>': TypeInfo(TypeOf.Class, create:() => <ProductProvider>[]),
});

Dart FindLocations 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.

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

{"data":[{"id":"String","int32Id":0,"name":"String","taxAuthorityId":"String","address":{"street":"String","city":{"id":"String","value":"String"},"postalCode":"String"},"status":0}],"currentPage":0,"pageSize":0,"totalItems":0,"totalPages":0}