<back to all web services

ChangeTemplateDto

The following routes are available for this service:
PUT/RestApi/Sitefinity/mobile-formats/templates/change
import 'package:servicestack/servicestack.dart';

class MobileFormatTemplateDto implements IConvertible
{
    String? Name;
    String? Value;

    MobileFormatTemplateDto({this.Name,this.Value});
    MobileFormatTemplateDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Name = json['Name'];
        Value = json['Value'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Name': Name,
        'Value': Value
    };

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

class ChangeTemplateInfoDto implements IConvertible
{
    MobileFormatTemplateDto? SelectedTemplate;
    MobileFormatTemplateDto? SelectedLayoutTemplate;
    bool? UseCustomCanonicalUrl;
    String? CustomCanonicalUrlFormat;
    String? MobileFormatId;

    ChangeTemplateInfoDto({this.SelectedTemplate,this.SelectedLayoutTemplate,this.UseCustomCanonicalUrl,this.CustomCanonicalUrlFormat,this.MobileFormatId});
    ChangeTemplateInfoDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        SelectedTemplate = JsonConverters.fromJson(json['SelectedTemplate'],'MobileFormatTemplateDto',context!);
        SelectedLayoutTemplate = JsonConverters.fromJson(json['SelectedLayoutTemplate'],'MobileFormatTemplateDto',context!);
        UseCustomCanonicalUrl = json['UseCustomCanonicalUrl'];
        CustomCanonicalUrlFormat = json['CustomCanonicalUrlFormat'];
        MobileFormatId = json['MobileFormatId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'SelectedTemplate': JsonConverters.toJson(SelectedTemplate,'MobileFormatTemplateDto',context!),
        'SelectedLayoutTemplate': JsonConverters.toJson(SelectedLayoutTemplate,'MobileFormatTemplateDto',context!),
        'UseCustomCanonicalUrl': UseCustomCanonicalUrl,
        'CustomCanonicalUrlFormat': CustomCanonicalUrlFormat,
        'MobileFormatId': MobileFormatId
    };

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

class ChangeTemplateDto implements IConvertible
{
    List<ChangeTemplateInfoDto>? TemplatesInfo;
    String? SiteId;
    String? ContentTypeId;

    ChangeTemplateDto({this.TemplatesInfo,this.SiteId,this.ContentTypeId});
    ChangeTemplateDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'TemplatesInfo': JsonConverters.toJson(TemplatesInfo,'List<ChangeTemplateInfoDto>',context!),
        'SiteId': SiteId,
        'ContentTypeId': ContentTypeId
    };

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

TypeContext _ctx = TypeContext(library: 'www.imglobal.com', types: <String, TypeInfo> {
    'MobileFormatTemplateDto': TypeInfo(TypeOf.Class, create:() => MobileFormatTemplateDto()),
    'ChangeTemplateInfoDto': TypeInfo(TypeOf.Class, create:() => ChangeTemplateInfoDto()),
    'ChangeTemplateDto': TypeInfo(TypeOf.Class, create:() => ChangeTemplateDto()),
    'List<ChangeTemplateInfoDto>': TypeInfo(TypeOf.Class, create:() => <ChangeTemplateInfoDto>[]),
});

Dart ChangeTemplateDto 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

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

PUT /RestApi/Sitefinity/mobile-formats/templates/change HTTP/1.1 
Host: www.imglobal.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"SiteId":"String","ContentTypeId":"String"}