GET | /RestApi/Sitefinity/mobile-formats/preview |
---|
import 'package:servicestack/servicestack.dart';
enum ContentLifecycleStatus
{
Master,
Temp,
Live,
Deleted,
PartialTemp,
}
class MobileFormatPreviewDto implements IConvertible
{
String? MobileFormatSettingName;
String? ContentTypeFullname;
String? ProviderName;
String? ItemUrlName;
ContentLifecycleStatus? Status;
String? SiteId;
MobileFormatPreviewDto({this.MobileFormatSettingName,this.ContentTypeFullname,this.ProviderName,this.ItemUrlName,this.Status,this.SiteId});
MobileFormatPreviewDto.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
MobileFormatSettingName = json['MobileFormatSettingName'];
ContentTypeFullname = json['ContentTypeFullname'];
ProviderName = json['ProviderName'];
ItemUrlName = json['ItemUrlName'];
Status = JsonConverters.fromJson(json['Status'],'ContentLifecycleStatus',context!);
SiteId = json['SiteId'];
return this;
}
Map<String, dynamic> toJson() => {
'MobileFormatSettingName': MobileFormatSettingName,
'ContentTypeFullname': ContentTypeFullname,
'ProviderName': ProviderName,
'ItemUrlName': ItemUrlName,
'Status': JsonConverters.toJson(Status,'ContentLifecycleStatus',context!),
'SiteId': SiteId
};
getTypeName() => "MobileFormatPreviewDto";
TypeContext? context = _ctx;
}
class MobileFormatPreviewUrlDto implements IConvertible
{
String? ItemTitle;
String? MobileFormatUrl;
String? MobileFormatPreviewUrl;
String? ErrorMessage;
MobileFormatPreviewUrlDto({this.ItemTitle,this.MobileFormatUrl,this.MobileFormatPreviewUrl,this.ErrorMessage});
MobileFormatPreviewUrlDto.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ItemTitle = json['ItemTitle'];
MobileFormatUrl = json['MobileFormatUrl'];
MobileFormatPreviewUrl = json['MobileFormatPreviewUrl'];
ErrorMessage = json['ErrorMessage'];
return this;
}
Map<String, dynamic> toJson() => {
'ItemTitle': ItemTitle,
'MobileFormatUrl': MobileFormatUrl,
'MobileFormatPreviewUrl': MobileFormatPreviewUrl,
'ErrorMessage': ErrorMessage
};
getTypeName() => "MobileFormatPreviewUrlDto";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'www.asg.com.au', types: <String, TypeInfo> {
'ContentLifecycleStatus': TypeInfo(TypeOf.Enum, enumValues:ContentLifecycleStatus.values),
'MobileFormatPreviewDto': TypeInfo(TypeOf.Class, create:() => MobileFormatPreviewDto()),
'MobileFormatPreviewUrlDto': TypeInfo(TypeOf.Class, create:() => MobileFormatPreviewUrlDto()),
});
Dart MobileFormatPreviewDto DTOs
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.
GET /RestApi/Sitefinity/mobile-formats/preview HTTP/1.1 Host: www.asg.com.au Accept: application/json
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"ItemTitle":"String","MobileFormatUrl":"String","MobileFormatPreviewUrl":"String","ErrorMessage":"String"}