CMS

<back to all web services

GetContent

The following routes are available for this service:
GET/content/{ContentID}
import 'package:servicestack/servicestack.dart';

class Content implements IConvertible
{
    int? contentID;
    int? cType;
    int? fkTaalID;
    String? cNaam;
    String? cPaginaTitel;
    String? cSEOOmschrijving;
    String? cSEOURL;
    int? fkSEOFotoID;
    String? cFocusTerm;
    String? cTitel;
    String? cTekst;
    String? cIntro;
    int? fkThumbnailID;
    int? cOrder;
    DateTime? laatsteUpdate;
    String? laatsteUpdateDoor;
    int? cHeaderFoto;
    String? cHeaderTekst;
    String? cC2ATekst;
    String? cC2ATekstButtonLink;
    String? cC2ATekstButtonTekst;
    String? cIntroOverzicht;
    String? cIntroOverOns;
    String? cIntroKort;
    DateTime? cDatum;
    String? cAuteur;

    Content({this.contentID,this.cType,this.fkTaalID,this.cNaam,this.cPaginaTitel,this.cSEOOmschrijving,this.cSEOURL,this.fkSEOFotoID,this.cFocusTerm,this.cTitel,this.cTekst,this.cIntro,this.fkThumbnailID,this.cOrder,this.laatsteUpdate,this.laatsteUpdateDoor,this.cHeaderFoto,this.cHeaderTekst,this.cC2ATekst,this.cC2ATekstButtonLink,this.cC2ATekstButtonTekst,this.cIntroOverzicht,this.cIntroOverOns,this.cIntroKort,this.cDatum,this.cAuteur});
    Content.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        contentID = json['contentID'];
        cType = json['cType'];
        fkTaalID = json['fkTaalID'];
        cNaam = json['cNaam'];
        cPaginaTitel = json['cPaginaTitel'];
        cSEOOmschrijving = json['cSEOOmschrijving'];
        cSEOURL = json['cSEOURL'];
        fkSEOFotoID = json['fkSEOFotoID'];
        cFocusTerm = json['cFocusTerm'];
        cTitel = json['cTitel'];
        cTekst = json['cTekst'];
        cIntro = json['cIntro'];
        fkThumbnailID = json['fkThumbnailID'];
        cOrder = json['cOrder'];
        laatsteUpdate = JsonConverters.fromJson(json['laatsteUpdate'],'DateTime',context!);
        laatsteUpdateDoor = json['laatsteUpdateDoor'];
        cHeaderFoto = json['cHeaderFoto'];
        cHeaderTekst = json['cHeaderTekst'];
        cC2ATekst = json['cC2ATekst'];
        cC2ATekstButtonLink = json['cC2ATekstButtonLink'];
        cC2ATekstButtonTekst = json['cC2ATekstButtonTekst'];
        cIntroOverzicht = json['cIntroOverzicht'];
        cIntroOverOns = json['cIntroOverOns'];
        cIntroKort = json['cIntroKort'];
        cDatum = JsonConverters.fromJson(json['cDatum'],'DateTime',context!);
        cAuteur = json['cAuteur'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'contentID': contentID,
        'cType': cType,
        'fkTaalID': fkTaalID,
        'cNaam': cNaam,
        'cPaginaTitel': cPaginaTitel,
        'cSEOOmschrijving': cSEOOmschrijving,
        'cSEOURL': cSEOURL,
        'fkSEOFotoID': fkSEOFotoID,
        'cFocusTerm': cFocusTerm,
        'cTitel': cTitel,
        'cTekst': cTekst,
        'cIntro': cIntro,
        'fkThumbnailID': fkThumbnailID,
        'cOrder': cOrder,
        'laatsteUpdate': JsonConverters.toJson(laatsteUpdate,'DateTime',context!),
        'laatsteUpdateDoor': laatsteUpdateDoor,
        'cHeaderFoto': cHeaderFoto,
        'cHeaderTekst': cHeaderTekst,
        'cC2ATekst': cC2ATekst,
        'cC2ATekstButtonLink': cC2ATekstButtonLink,
        'cC2ATekstButtonTekst': cC2ATekstButtonTekst,
        'cIntroOverzicht': cIntroOverzicht,
        'cIntroOverOns': cIntroOverOns,
        'cIntroKort': cIntroKort,
        'cDatum': JsonConverters.toJson(cDatum,'DateTime',context!),
        'cAuteur': cAuteur
    };

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

class GetContentResponse implements IConvertible
{
    Content? result;
    ResponseStatus? responseStatus;

    GetContentResponse({this.result,this.responseStatus});
    GetContentResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        result = JsonConverters.fromJson(json['result'],'Content',context!);
        responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'result': JsonConverters.toJson(result,'Content',context!),
        'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
    };

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

class GetContent implements IConvertible
{
    int? contentID;

    GetContent({this.contentID});
    GetContent.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

TypeContext _ctx = TypeContext(library: 'cms.exitus_ict.nl', types: <String, TypeInfo> {
    'Content': TypeInfo(TypeOf.Class, create:() => Content()),
    'GetContentResponse': TypeInfo(TypeOf.Class, create:() => GetContentResponse()),
    'GetContent': TypeInfo(TypeOf.Class, create:() => GetContent()),
});

Dart GetContent DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

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

GET /content/{ContentID} HTTP/1.1 
Host: cms.exitus-ict.nl 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	result: 
	{
		contentID: 0,
		cType: 0,
		fkTaalID: 0,
		cNaam: String,
		cPaginaTitel: String,
		cSEOOmschrijving: String,
		cSEOURL: String,
		fkSEOFotoID: 0,
		cFocusTerm: String,
		cTitel: String,
		cTekst: String,
		cIntro: String,
		fkThumbnailID: 0,
		cOrder: 0,
		laatsteUpdate: 0001-01-01,
		laatsteUpdateDoor: String,
		cHeaderFoto: 0,
		cHeaderTekst: String,
		cC2ATekst: String,
		cC2ATekstButtonLink: String,
		cC2ATekstButtonTekst: String,
		cIntroOverzicht: String,
		cIntroOverOns: String,
		cIntroKort: String,
		cDatum: 0001-01-01,
		cAuteur: String
	},
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	}
}