TicketUserServices

<back to all web services

FanSyncClubsRequest

Requires Authentication
Required role:Admin
The following routes are available for this service:
POST/FanSync/Clubs
import 'package:servicestack/servicestack.dart';

class FanSyncClubsResult implements IConvertible
{
    int? mapped;
    int? unmapped;
    int? statusCode;
    String? message;

    FanSyncClubsResult({this.mapped,this.unmapped,this.statusCode,this.message});
    FanSyncClubsResult.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        mapped = json['mapped'];
        unmapped = json['unmapped'];
        statusCode = json['statusCode'];
        message = json['message'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'mapped': mapped,
        'unmapped': unmapped,
        'statusCode': statusCode,
        'message': message
    };

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

class FanSyncTeam implements IConvertible
{
    String? teamNumber;
    String? name;
    String? clubTeamNumber;
    String? clubName;

    FanSyncTeam({this.teamNumber,this.name,this.clubTeamNumber,this.clubName});
    FanSyncTeam.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class FanSyncClubsRequest implements IConvertible
{
    List<FanSyncTeam>? teams;

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

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

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

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

TypeContext _ctx = TypeContext(library: 'stubbur_app.azurewebsites.net', types: <String, TypeInfo> {
    'FanSyncClubsResult': TypeInfo(TypeOf.Class, create:() => FanSyncClubsResult()),
    'FanSyncTeam': TypeInfo(TypeOf.Class, create:() => FanSyncTeam()),
    'FanSyncClubsRequest': TypeInfo(TypeOf.Class, create:() => FanSyncClubsRequest()),
    'List<FanSyncTeam>': TypeInfo(TypeOf.Class, create:() => <FanSyncTeam>[]),
});

Dart FanSyncClubsRequest 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 /FanSync/Clubs HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"teams":[{"teamNumber":"String","name":"String","clubTeamNumber":"String","clubName":"String"}]}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"mapped":0,"unmapped":0,"statusCode":0,"message":"String"}