ASH.ResourceLibrary.WebApi

<back to all web services

DigitalFitnessContentRequest

Requires Authentication
The following routes are available for this service:
GET/digitalFitnessResourcesUse to get digital fitness library content
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 DigitalFitnessContentRequest extends BasicResourceLibraryRequest implements IConvertible
{
    DigitalFitnessContentRequest();
    DigitalFitnessContentRequest.fromJson(Map<String, dynamic> json) : super.fromJson(json);
    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson();
    getTypeName() => "DigitalFitnessContentRequest";
    TypeContext? context = _ctx;
}

class Tag implements IConvertible
{
    String? id;
    String? title;

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

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

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

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

class ScreenshotItem implements IConvertible
{
    String? largeFilepathS3;
    String? thumbFilepathS3;
    double? order;
    String? description;

    ScreenshotItem({this.largeFilepathS3,this.thumbFilepathS3,this.order,this.description});
    ScreenshotItem.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        largeFilepathS3 = json['largeFilepathS3'];
        thumbFilepathS3 = json['thumbFilepathS3'];
        order = JsonConverters.toDouble(json['order']);
        description = json['description'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'largeFilepathS3': largeFilepathS3,
        'thumbFilepathS3': thumbFilepathS3,
        'order': order,
        'description': description
    };

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

class ResourceCard implements IConvertible
{
    String? id;
    String? title;
    String? description;
    String? descriptionSummary;
    String? type;
    String? content;
    bool? isComplete;
    bool? isFavorite;
    bool? isImplicitlyComplete;
    String? mediaPath;
    bool? isConfirmable;
    bool? isWcagCompliant;
    String? duration;
    String? preview;
    int? calories;
    String? instructor;
    String? thumbnail;
    String? difficulty;
    List<Tag>? tags;
    String? subtitles;
    List<ScreenshotItem>? screenshots;
    bool? drmEncrypted;

    ResourceCard({this.id,this.title,this.description,this.descriptionSummary,this.type,this.content,this.isComplete,this.isFavorite,this.isImplicitlyComplete,this.mediaPath,this.isConfirmable,this.isWcagCompliant,this.duration,this.preview,this.calories,this.instructor,this.thumbnail,this.difficulty,this.tags,this.subtitles,this.screenshots,this.drmEncrypted});
    ResourceCard.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        title = json['title'];
        description = json['description'];
        descriptionSummary = json['descriptionSummary'];
        type = json['type'];
        content = json['content'];
        isComplete = json['isComplete'];
        isFavorite = json['isFavorite'];
        isImplicitlyComplete = json['isImplicitlyComplete'];
        mediaPath = json['mediaPath'];
        isConfirmable = json['isConfirmable'];
        isWcagCompliant = json['isWcagCompliant'];
        duration = json['duration'];
        preview = json['preview'];
        calories = json['calories'];
        instructor = json['instructor'];
        thumbnail = json['thumbnail'];
        difficulty = json['difficulty'];
        tags = JsonConverters.fromJson(json['tags'],'List<Tag>',context!);
        subtitles = json['subtitles'];
        screenshots = JsonConverters.fromJson(json['screenshots'],'List<ScreenshotItem>',context!);
        drmEncrypted = json['drmEncrypted'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'title': title,
        'description': description,
        'descriptionSummary': descriptionSummary,
        'type': type,
        'content': content,
        'isComplete': isComplete,
        'isFavorite': isFavorite,
        'isImplicitlyComplete': isImplicitlyComplete,
        'mediaPath': mediaPath,
        'isConfirmable': isConfirmable,
        'isWcagCompliant': isWcagCompliant,
        'duration': duration,
        'preview': preview,
        'calories': calories,
        'instructor': instructor,
        'thumbnail': thumbnail,
        'difficulty': difficulty,
        'tags': JsonConverters.toJson(tags,'List<Tag>',context!),
        'subtitles': subtitles,
        'screenshots': JsonConverters.toJson(screenshots,'List<ScreenshotItem>',context!),
        'drmEncrypted': drmEncrypted
    };

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

class SubtopicLite implements IConvertible
{
    String? id;
    String? title;
    int? resourceCount;
    List<ResourceCard>? resourceItems;

    SubtopicLite({this.id,this.title,this.resourceCount,this.resourceItems});
    SubtopicLite.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        title = json['title'];
        resourceCount = json['resourceCount'];
        resourceItems = JsonConverters.fromJson(json['resourceItems'],'List<ResourceCard>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'title': title,
        'resourceCount': resourceCount,
        'resourceItems': JsonConverters.toJson(resourceItems,'List<ResourceCard>',context!)
    };

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

class TopicLite implements IConvertible
{
    String? id;
    List<SubtopicLite>? subtopicItems;
    List<ResourceCard>? resourceItems;
    String? title;
    String? isVisible;
    int? resourceCount;

    TopicLite({this.id,this.subtopicItems,this.resourceItems,this.title,this.isVisible,this.resourceCount});
    TopicLite.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        subtopicItems = JsonConverters.fromJson(json['subtopicItems'],'List<SubtopicLite>',context!);
        resourceItems = JsonConverters.fromJson(json['resourceItems'],'List<ResourceCard>',context!);
        title = json['title'];
        isVisible = json['isVisible'];
        resourceCount = json['resourceCount'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'subtopicItems': JsonConverters.toJson(subtopicItems,'List<SubtopicLite>',context!),
        'resourceItems': JsonConverters.toJson(resourceItems,'List<ResourceCard>',context!),
        'title': title,
        'isVisible': isVisible,
        'resourceCount': resourceCount
    };

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

class DigitalFitnessResourcesResponse implements IConvertible
{
    List<TopicLite>? digitalFitnessResources;

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

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

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

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

TypeContext _ctx = TypeContext(library: 'resourcelibrary.api.ashcompanies.com', types: <String, TypeInfo> {
    'BasicResourceLibraryRequest': TypeInfo(TypeOf.Class, create:() => BasicResourceLibraryRequest()),
    'DigitalFitnessContentRequest': TypeInfo(TypeOf.Class, create:() => DigitalFitnessContentRequest()),
    'Tag': TypeInfo(TypeOf.Class, create:() => Tag()),
    'ScreenshotItem': TypeInfo(TypeOf.Class, create:() => ScreenshotItem()),
    'ResourceCard': TypeInfo(TypeOf.Class, create:() => ResourceCard()),
    'List<Tag>': TypeInfo(TypeOf.Class, create:() => <Tag>[]),
    'List<ScreenshotItem>': TypeInfo(TypeOf.Class, create:() => <ScreenshotItem>[]),
    'SubtopicLite': TypeInfo(TypeOf.Class, create:() => SubtopicLite()),
    'List<ResourceCard>': TypeInfo(TypeOf.Class, create:() => <ResourceCard>[]),
    'TopicLite': TypeInfo(TypeOf.Class, create:() => TopicLite()),
    'List<SubtopicLite>': TypeInfo(TypeOf.Class, create:() => <SubtopicLite>[]),
    'DigitalFitnessResourcesResponse': TypeInfo(TypeOf.Class, create:() => DigitalFitnessResourcesResponse()),
    'List<TopicLite>': TypeInfo(TypeOf.Class, create:() => <TopicLite>[]),
});

Dart DigitalFitnessContentRequest 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 /digitalFitnessResources HTTP/1.1 
Host: resourcelibrary.api.ashcompanies.com 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"digitalFitnessResources":[{"id":"String","subtopicItems":null,"resourceItems":null,"title":"String","isVisible":"String","resourceCount":0}]}