AlbaApi

<back to all web services

ApproveContents

Requires Authentication
The following routes are available for this service:
POST,PUT/approve/changelogs
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class Entity implements IEntity, IConvertible
{
    String? id;

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

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

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

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

class Content extends Entity implements IConvertible
{
    String? section;
    String? itemId;
    String? itemCode;
    String? country;
    String? lang;
    String? app;
    String? companyId;
    String? company;
    Map<String,String?>? elements;

    Content({this.section,this.itemId,this.itemCode,this.country,this.lang,this.app,this.companyId,this.company,this.elements});
    Content.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        section = json['section'];
        itemId = json['itemId'];
        itemCode = json['itemCode'];
        country = json['country'];
        lang = json['lang'];
        app = json['app'];
        companyId = json['companyId'];
        company = json['company'];
        elements = JsonConverters.toStringMap(json['elements']);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'section': section,
        'itemId': itemId,
        'itemCode': itemCode,
        'country': country,
        'lang': lang,
        'app': app,
        'companyId': companyId,
        'company': company,
        'elements': elements
    });

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

class ApproveContent extends Content implements IConvertible
{
    String? status;

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

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

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'status': status
    });

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

class ApproveContents extends ListBase<ApproveContent> implements IConvertible
{
    final List<ApproveContent> l = [];
    set length(int newLength) { l.length = newLength; }
    int get length => l.length;
    ApproveContent operator [](int index) => l[index];
    void operator []=(int index, ApproveContent value) { l[index] = value; }
    ApproveContents();
    ApproveContents.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "ApproveContents";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'hcbtas_q_albamfs_api.azurewebsites.net', types: <String, TypeInfo> {
    'Entity': TypeInfo(TypeOf.Class, create:() => Entity()),
    'Content': TypeInfo(TypeOf.Class, create:() => Content()),
    'ApproveContent': TypeInfo(TypeOf.Class, create:() => ApproveContent()),
    'ApproveContents': TypeInfo(TypeOf.Class, create:() => ApproveContents()),
});

Dart ApproveContents 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.

POST /approve/changelogs HTTP/1.1 
Host: hcbtas-q-albamfs-api.azurewebsites.net 
Accept: application/json
Content-Type: application/json
Content-Length: length

[]
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"section":"String","itemId":"String","itemCode":"String","country":"String","lang":"String","app":"String","companyId":"String","company":"String","elements":{"String":"String"},"id":"String"}