GET | /workoutCategories | Use to get workout categories list |
---|
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 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 SubTopic implements IConvertible
{
String? id;
String? title;
int? resourceCount;
List<ResourceItem>? resourceItems;
SubTopic({this.id,this.title,this.resourceCount,this.resourceItems});
SubTopic.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<ResourceItem>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'title': title,
'resourceCount': resourceCount,
'resourceItems': JsonConverters.toJson(resourceItems,'List<ResourceItem>',context!)
};
getTypeName() => "SubTopic";
TypeContext? context = _ctx;
}
class Category implements IConvertible
{
String? id;
List<SubTopic>? subtopicItems;
List<ResourceItem>? resourceItems;
String? title;
String? isVisible;
int? resourceCount;
Category({this.id,this.subtopicItems,this.resourceItems,this.title,this.isVisible,this.resourceCount});
Category.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
subtopicItems = JsonConverters.fromJson(json['subtopicItems'],'List<SubTopic>',context!);
resourceItems = JsonConverters.fromJson(json['resourceItems'],'List<ResourceItem>',context!);
title = json['title'];
isVisible = json['isVisible'];
resourceCount = json['resourceCount'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'subtopicItems': JsonConverters.toJson(subtopicItems,'List<SubTopic>',context!),
'resourceItems': JsonConverters.toJson(resourceItems,'List<ResourceItem>',context!),
'title': title,
'isVisible': isVisible,
'resourceCount': resourceCount
};
getTypeName() => "Category";
TypeContext? context = _ctx;
}
class ActivityItem implements IConvertible
{
String? name;
String? id;
ActivityItem({this.name,this.id});
ActivityItem.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
name = json['name'];
id = json['id'];
return this;
}
Map<String, dynamic> toJson() => {
'name': name,
'id': id
};
getTypeName() => "ActivityItem";
TypeContext? context = _ctx;
}
class SeriesItem implements IConvertible
{
String? id;
String? title;
SeriesItem({this.id,this.title});
SeriesItem.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() => "SeriesItem";
TypeContext? context = _ctx;
}
class AltMediaPaths implements IConvertible
{
String? webm;
String? ogv;
String? mp4Low;
String? mp4High;
AltMediaPaths({this.webm,this.ogv,this.mp4Low,this.mp4High});
AltMediaPaths.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
webm = json['webm'];
ogv = json['ogv'];
mp4Low = json['mp4Low'];
mp4High = json['mp4High'];
return this;
}
Map<String, dynamic> toJson() => {
'webm': webm,
'ogv': ogv,
'mp4Low': mp4Low,
'mp4High': mp4High
};
getTypeName() => "AltMediaPaths";
TypeContext? context = _ctx;
}
class ResourceItem extends ResourceCard implements IConvertible
{
String? content;
String? credit;
String? references;
String? disclaimer;
String? headerImage;
String? origin;
String? originId;
List<Tag>? tags;
List<Category>? categories;
int? index;
String? activityLevel;
String? activityDetails;
String? transcript;
bool? isArchived;
List<ActivityItem>? activities;
List<SeriesItem>? seriesItems;
String? videoId;
String? focus;
String? series;
String? seriesUrl;
String? category;
List<String>? equipments;
String? durationRange;
String? providerName;
String? uploadDate;
DateTime? completionDate;
String? level;
String? bodyFocus;
AltMediaPaths? altMediaPaths;
String? subtitles;
bool? drmEncrypted;
List<ScreenshotItem>? screenshots;
ResourceItem({this.content,this.credit,this.references,this.disclaimer,this.headerImage,this.origin,this.originId,this.tags,this.categories,this.index,this.activityLevel,this.activityDetails,this.transcript,this.isArchived,this.activities,this.seriesItems,this.videoId,this.focus,this.series,this.seriesUrl,this.category,this.equipments,this.durationRange,this.providerName,this.uploadDate,this.completionDate,this.level,this.bodyFocus,this.altMediaPaths,this.subtitles,this.drmEncrypted,this.screenshots});
ResourceItem.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
content = json['content'];
credit = json['credit'];
references = json['references'];
disclaimer = json['disclaimer'];
headerImage = json['headerImage'];
origin = json['origin'];
originId = json['originId'];
tags = JsonConverters.fromJson(json['tags'],'List<Tag>',context!);
categories = JsonConverters.fromJson(json['categories'],'List<Category>',context!);
index = json['index'];
activityLevel = json['activityLevel'];
activityDetails = json['activityDetails'];
transcript = json['transcript'];
isArchived = json['isArchived'];
activities = JsonConverters.fromJson(json['activities'],'List<ActivityItem>',context!);
seriesItems = JsonConverters.fromJson(json['seriesItems'],'List<SeriesItem>',context!);
videoId = json['videoId'];
focus = json['focus'];
series = json['series'];
seriesUrl = json['seriesUrl'];
category = json['category'];
equipments = JsonConverters.fromJson(json['equipments'],'List<String>',context!);
durationRange = json['durationRange'];
providerName = json['providerName'];
uploadDate = json['uploadDate'];
completionDate = JsonConverters.fromJson(json['completionDate'],'DateTime',context!);
level = json['level'];
bodyFocus = json['bodyFocus'];
altMediaPaths = JsonConverters.fromJson(json['altMediaPaths'],'AltMediaPaths',context!);
subtitles = json['subtitles'];
drmEncrypted = json['drmEncrypted'];
screenshots = JsonConverters.fromJson(json['screenshots'],'List<ScreenshotItem>',context!);
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'content': content,
'credit': credit,
'references': references,
'disclaimer': disclaimer,
'headerImage': headerImage,
'origin': origin,
'originId': originId,
'tags': JsonConverters.toJson(tags,'List<Tag>',context!),
'categories': JsonConverters.toJson(categories,'List<Category>',context!),
'index': index,
'activityLevel': activityLevel,
'activityDetails': activityDetails,
'transcript': transcript,
'isArchived': isArchived,
'activities': JsonConverters.toJson(activities,'List<ActivityItem>',context!),
'seriesItems': JsonConverters.toJson(seriesItems,'List<SeriesItem>',context!),
'videoId': videoId,
'focus': focus,
'series': series,
'seriesUrl': seriesUrl,
'category': category,
'equipments': JsonConverters.toJson(equipments,'List<String>',context!),
'durationRange': durationRange,
'providerName': providerName,
'uploadDate': uploadDate,
'completionDate': JsonConverters.toJson(completionDate,'DateTime',context!),
'level': level,
'bodyFocus': bodyFocus,
'altMediaPaths': JsonConverters.toJson(altMediaPaths,'AltMediaPaths',context!),
'subtitles': subtitles,
'drmEncrypted': drmEncrypted,
'screenshots': JsonConverters.toJson(screenshots,'List<ScreenshotItem>',context!)
});
getTypeName() => "ResourceItem";
TypeContext? context = _ctx;
}
class WorkoutCategory implements IConvertible
{
String? id;
String? name;
String? workoutCategoryImage;
List<ResourceItem>? resourceItems;
WorkoutCategory({this.id,this.name,this.workoutCategoryImage,this.resourceItems});
WorkoutCategory.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
workoutCategoryImage = json['workoutCategoryImage'];
resourceItems = JsonConverters.fromJson(json['resourceItems'],'List<ResourceItem>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'workoutCategoryImage': workoutCategoryImage,
'resourceItems': JsonConverters.toJson(resourceItems,'List<ResourceItem>',context!)
};
getTypeName() => "WorkoutCategory";
TypeContext? context = _ctx;
}
class WorkoutCategoriesRequest extends BasicResourceLibraryRequest implements IConvertible
{
List<WorkoutCategory>? workoutCategories;
String? workoutCategoryId;
WorkoutCategoriesRequest({this.workoutCategories,this.workoutCategoryId});
WorkoutCategoriesRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
workoutCategories = JsonConverters.fromJson(json['workoutCategories'],'List<WorkoutCategory>',context!);
workoutCategoryId = json['workoutCategoryId'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'workoutCategories': JsonConverters.toJson(workoutCategories,'List<WorkoutCategory>',context!),
'workoutCategoryId': workoutCategoryId
});
getTypeName() => "WorkoutCategoriesRequest";
TypeContext? context = _ctx;
}
class Meta implements IConvertible
{
int? resourceCount;
String? title;
Meta({this.resourceCount,this.title});
Meta.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
resourceCount = json['resourceCount'];
title = json['title'];
return this;
}
Map<String, dynamic> toJson() => {
'resourceCount': resourceCount,
'title': title
};
getTypeName() => "Meta";
TypeContext? context = _ctx;
}
class WorkoutCategoriesResponse implements IConvertible
{
List<WorkoutCategory>? workoutCategories;
Meta? meta;
WorkoutCategoriesResponse({this.workoutCategories,this.meta});
WorkoutCategoriesResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
workoutCategories = JsonConverters.fromJson(json['workoutCategories'],'List<WorkoutCategory>',context!);
meta = JsonConverters.fromJson(json['meta'],'Meta',context!);
return this;
}
Map<String, dynamic> toJson() => {
'workoutCategories': JsonConverters.toJson(workoutCategories,'List<WorkoutCategory>',context!),
'meta': JsonConverters.toJson(meta,'Meta',context!)
};
getTypeName() => "WorkoutCategoriesResponse";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'resourcelibrary.api.ashcompanies.com', types: <String, TypeInfo> {
'BasicResourceLibraryRequest': TypeInfo(TypeOf.Class, create:() => BasicResourceLibraryRequest()),
'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>[]),
'SubTopic': TypeInfo(TypeOf.Class, create:() => SubTopic()),
'List<ResourceItem>': TypeInfo(TypeOf.Class, create:() => <ResourceItem>[]),
'ResourceItem': TypeInfo(TypeOf.Class, create:() => ResourceItem()),
'Category': TypeInfo(TypeOf.Class, create:() => Category()),
'List<SubTopic>': TypeInfo(TypeOf.Class, create:() => <SubTopic>[]),
'ActivityItem': TypeInfo(TypeOf.Class, create:() => ActivityItem()),
'SeriesItem': TypeInfo(TypeOf.Class, create:() => SeriesItem()),
'AltMediaPaths': TypeInfo(TypeOf.Class, create:() => AltMediaPaths()),
'List<Category>': TypeInfo(TypeOf.Class, create:() => <Category>[]),
'List<ActivityItem>': TypeInfo(TypeOf.Class, create:() => <ActivityItem>[]),
'List<SeriesItem>': TypeInfo(TypeOf.Class, create:() => <SeriesItem>[]),
'WorkoutCategory': TypeInfo(TypeOf.Class, create:() => WorkoutCategory()),
'WorkoutCategoriesRequest': TypeInfo(TypeOf.Class, create:() => WorkoutCategoriesRequest()),
'List<WorkoutCategory>': TypeInfo(TypeOf.Class, create:() => <WorkoutCategory>[]),
'Meta': TypeInfo(TypeOf.Class, create:() => Meta()),
'WorkoutCategoriesResponse': TypeInfo(TypeOf.Class, create:() => WorkoutCategoriesResponse()),
});
Dart WorkoutCategoriesRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /workoutCategories HTTP/1.1 Host: resourcelibrary.api.ashcompanies.com Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <WorkoutCategoriesResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ASH.ResourceLibrary.Interfaces.ServiceModels"> <Meta xmlns:d2p1="http://schemas.datacontract.org/2004/07/ASH.ResourceLibrary.Interfaces.Models"> <d2p1:ResourceCount>0</d2p1:ResourceCount> <d2p1:Title>String</d2p1:Title> </Meta> <WorkoutCategories xmlns:d2p1="http://schemas.datacontract.org/2004/07/ASH.ResourceLibrary.Interfaces.Models"> <d2p1:WorkoutCategory> <d2p1:Id>String</d2p1:Id> <d2p1:Name>String</d2p1:Name> <d2p1:ResourceItems i:nil="true" /> <d2p1:WorkoutCategoryImage>String</d2p1:WorkoutCategoryImage> </d2p1:WorkoutCategory> </WorkoutCategories> </WorkoutCategoriesResponse>