| POST | /api/v1/marketplace/staging/media |
|---|
import 'package:servicestack/servicestack.dart';
class Status implements IConvertible
{
String? message;
int? statusCode;
Status({this.message,this.statusCode});
Status.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
message = json['message'];
statusCode = json['statusCode'];
return this;
}
Map<String, dynamic> toJson() => {
'message': message,
'statusCode': statusCode
};
getTypeName() => "Status";
TypeContext? context = _ctx;
}
class BaseResponse implements IConvertible
{
Status? status;
BaseResponse({this.status});
BaseResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
status = JsonConverters.fromJson(json['status'],'Status',context!);
return this;
}
Map<String, dynamic> toJson() => {
'status': JsonConverters.toJson(status,'Status',context!)
};
getTypeName() => "BaseResponse";
TypeContext? context = _ctx;
}
class UploadStagingMediaResponse extends BaseResponse implements IConvertible
{
String? id;
DateTime? expiresAtUtc;
UploadStagingMediaResponse({this.id,this.expiresAtUtc});
UploadStagingMediaResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
id = json['id'];
expiresAtUtc = JsonConverters.fromJson(json['expiresAtUtc'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'id': id,
'expiresAtUtc': JsonConverters.toJson(expiresAtUtc,'DateTime',context!)
});
getTypeName() => "UploadStagingMediaResponse";
TypeContext? context = _ctx;
}
class UploadStagingMedia implements IPost, IConvertible
{
UploadStagingMedia();
UploadStagingMedia.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "UploadStagingMedia";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'pecuario_backend.develsystems.com', types: <String, TypeInfo> {
'Status': TypeInfo(TypeOf.Class, create:() => Status()),
'BaseResponse': TypeInfo(TypeOf.Class, create:() => BaseResponse()),
'UploadStagingMediaResponse': TypeInfo(TypeOf.Class, create:() => UploadStagingMediaResponse()),
'UploadStagingMedia': TypeInfo(TypeOf.Class, create:() => UploadStagingMedia()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/v1/marketplace/staging/media HTTP/1.1
Host: pecuario-backend.develsystems.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"id":"String","expiresAtUtc":"\/Date(-62135596800000-0000)\/"}