ASH.ResourceLibrary.WebApi

<back to all web services

TopicListRequest

Requires Authentication
The following routes are available for this service:
GET/topicsListUse to get Resource Library Topic names
import 'package:servicestack/servicestack.dart';

class BasicResourceLibraryRequest implements IConvertible
{
    int? resourceLibraryMemberId;

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

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

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

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

class TopicItem implements IConvertible
{
    String? id;
    String? title;
    bool? isNavItem;
    bool? isVisible;

    TopicItem({this.id,this.title,this.isNavItem,this.isVisible});
    TopicItem.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class TopicListResponse implements IConvertible
{
    List<TopicItem>? topicsList;

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

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

    Map<String, dynamic> toJson() => {
        'topicsList': JsonConverters.toJson(topicsList,'List<TopicItem>',context!)
    };

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

class TopicListRequest extends BasicResourceLibraryRequest implements IConvertible
{
    bool? digitalFitness;

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

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

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

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

TypeContext _ctx = TypeContext(library: 'resourcelibrary.api.ashcompanies.com', types: <String, TypeInfo> {
    'BasicResourceLibraryRequest': TypeInfo(TypeOf.Class, create:() => BasicResourceLibraryRequest()),
    'TopicItem': TypeInfo(TypeOf.Class, create:() => TopicItem()),
    'TopicListResponse': TypeInfo(TypeOf.Class, create:() => TopicListResponse()),
    'List<TopicItem>': TypeInfo(TypeOf.Class, create:() => <TopicItem>[]),
    'TopicListRequest': TypeInfo(TypeOf.Class, create:() => TopicListRequest()),
});

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

GET /topicsList HTTP/1.1 
Host: resourcelibrary.api.ashcompanies.com 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"topicsList":[{"id":"String","title":"String","isNavItem":false,"isVisible":false}]}