Six4Win.WebApi

<back to all web services

GetLookup

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

class LookupItem implements IConvertible
{
    String? id;
    String? value;
    String? tag;

    LookupItem({this.id,this.value,this.tag});
    LookupItem.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class Lookup implements IConvertible
{
    String? id;
    List<LookupItem>? data;

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

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        data = JsonConverters.fromJson(json['data'],'List<LookupItem>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'data': JsonConverters.toJson(data,'List<LookupItem>',context!)
    };

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

class GetLookup implements IConvertible
{
    String? id;

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

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

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

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

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

Dart GetLookup 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/lookups HTTP/1.1 
Host: s4w2.api.bettor.cc 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

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

{"id":"String","data":[{"id":"String","value":"String","tag":"String"}]}