| Required role: | Admin |
| 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>[]),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
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: application/xml
Content-Type: application/xml
Content-Length: length
<FanSyncClubsRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<Teams>
<FanSyncTeam>
<ClubName>String</ClubName>
<ClubTeamNumber>String</ClubTeamNumber>
<Name>String</Name>
<TeamNumber>String</TeamNumber>
</FanSyncTeam>
</Teams>
</FanSyncClubsRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <FanSyncClubsResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel"> <Mapped>0</Mapped> <Message>String</Message> <StatusCode>0</StatusCode> <Unmapped>0</Unmapped> </FanSyncClubsResult>