Requires any of the roles: | Admin, TeamAdmin, MobileApp | Required permission: | Tickets.Add |
POST | /Venues |
---|
import 'package:servicestack/servicestack.dart';
class Venue implements IConvertible
{
int? id;
String? name;
String? countryCode;
double? latitude;
double? longitude;
Venue({this.id,this.name,this.countryCode,this.latitude,this.longitude});
Venue.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
countryCode = json['countryCode'];
latitude = JsonConverters.toDouble(json['latitude']);
longitude = JsonConverters.toDouble(json['longitude']);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'countryCode': countryCode,
'latitude': latitude,
'longitude': longitude
};
getTypeName() => "Venue";
TypeContext? context = _ctx;
}
class VenuesResult implements IConvertible
{
List<Venue>? items;
int? statusCode;
String? message;
VenuesResult({this.items,this.statusCode,this.message});
VenuesResult.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
items = JsonConverters.fromJson(json['items'],'List<Venue>',context!);
statusCode = json['statusCode'];
message = json['message'];
return this;
}
Map<String, dynamic> toJson() => {
'items': JsonConverters.toJson(items,'List<Venue>',context!),
'statusCode': statusCode,
'message': message
};
getTypeName() => "VenuesResult";
TypeContext? context = _ctx;
}
class VenuesSearchRequest implements IConvertible
{
String? name;
String? countryCode;
VenuesSearchRequest({this.name,this.countryCode});
VenuesSearchRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
name = json['name'];
countryCode = json['countryCode'];
return this;
}
Map<String, dynamic> toJson() => {
'name': name,
'countryCode': countryCode
};
getTypeName() => "VenuesSearchRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'stubbur_autoupdates_live.smartnewapis.com', types: <String, TypeInfo> {
'Venue': TypeInfo(TypeOf.Class, create:() => Venue()),
'VenuesResult': TypeInfo(TypeOf.Class, create:() => VenuesResult()),
'List<Venue>': TypeInfo(TypeOf.Class, create:() => <Venue>[]),
'VenuesSearchRequest': TypeInfo(TypeOf.Class, create:() => VenuesSearchRequest()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /Venues HTTP/1.1
Host: stubbur-autoupdates-live.smartnewapis.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"name":"String","countryCode":"String"}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"items":[{"id":0,"name":"String","countryCode":"String","latitude":0,"longitude":0}],"statusCode":0,"message":"String"}