ASH.ResourceLibrary.WebApi

<back to all web services

WorkoutCategoriesRequest

Requires Authentication
The following routes are available for this service:
GET/workoutCategoriesUse to get workout categories list
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using ASH.ResourceLibrary.Interfaces.ServiceModels;
using ASH.ResourceLibrary.Interfaces.Models;

namespace ASH.ResourceLibrary.Interfaces.Models
{
    public partial class ActivityItem
    {
        public virtual string Name { get; set; }
        public virtual string Id { get; set; }
    }

    public partial class AltMediaPaths
    {
        public virtual string Webm { get; set; }
        public virtual string Ogv { get; set; }
        public virtual string Mp4Low { get; set; }
        public virtual string Mp4High { get; set; }
    }

    public partial class Category
    {
        public virtual string Id { get; set; }
        public virtual ICollection<SubTopic> SubtopicItems { get; set; }
        public virtual ICollection<ResourceItem> ResourceItems { get; set; }
        public virtual string Title { get; set; }
        public virtual string IsVisible { get; set; }
        public virtual int ResourceCount { get; set; }
    }

    public partial class Meta
    {
        public virtual int ResourceCount { get; set; }
        public virtual string Title { get; set; }
    }

    public partial class ResourceCard
    {
        public ResourceCard()
        {
            Tags = new List<Tag>{};
            Screenshots = new List<ScreenshotItem>{};
        }

        public virtual string Id { get; set; }
        public virtual string Title { get; set; }
        public virtual string Description { get; set; }
        public virtual string DescriptionSummary { get; set; }
        public virtual string Type { get; set; }
        public virtual string Content { get; set; }
        public virtual bool IsComplete { get; set; }
        public virtual bool IsFavorite { get; set; }
        public virtual bool IsImplicitlyComplete { get; set; }
        public virtual string MediaPath { get; set; }
        public virtual bool IsConfirmable { get; set; }
        public virtual bool IsWcagCompliant { get; set; }
        public virtual string Duration { get; set; }
        public virtual string Preview { get; set; }
        public virtual int Calories { get; set; }
        public virtual string Instructor { get; set; }
        public virtual string Thumbnail { get; set; }
        public virtual string Difficulty { get; set; }
        public virtual List<Tag> Tags { get; set; }
        public virtual string Subtitles { get; set; }
        public virtual List<ScreenshotItem> Screenshots { get; set; }
        public virtual bool DrmEncrypted { get; set; }
    }

    public partial class ResourceItem
        : ResourceCard
    {
        public ResourceItem()
        {
            Tags = new List<Tag>{};
            Categories = new List<Category>{};
            Activities = new List<ActivityItem>{};
            SeriesItems = new List<SeriesItem>{};
            Equipments = new List<string>{};
            Screenshots = new List<ScreenshotItem>{};
        }

        public virtual string Content { get; set; }
        public virtual string Credit { get; set; }
        public virtual string References { get; set; }
        public virtual string Disclaimer { get; set; }
        public virtual string HeaderImage { get; set; }
        public virtual string Origin { get; set; }
        public virtual string OriginId { get; set; }
        public virtual List<Tag> Tags { get; set; }
        public virtual List<Category> Categories { get; set; }
        public virtual int Index { get; set; }
        public virtual string ActivityLevel { get; set; }
        public virtual string ActivityDetails { get; set; }
        public virtual string Transcript { get; set; }
        public virtual bool IsArchived { get; set; }
        public virtual List<ActivityItem> Activities { get; set; }
        public virtual List<SeriesItem> SeriesItems { get; set; }
        public virtual string VideoId { get; set; }
        public virtual string Focus { get; set; }
        public virtual string Series { get; set; }
        public virtual string SeriesUrl { get; set; }
        public virtual string Category { get; set; }
        public virtual List<string> Equipments { get; set; }
        public virtual string DurationRange { get; set; }
        public virtual string ProviderName { get; set; }
        public virtual string UploadDate { get; set; }
        public virtual DateTime? CompletionDate { get; set; }
        public virtual string Level { get; set; }
        public virtual string BodyFocus { get; set; }
        public virtual AltMediaPaths AltMediaPaths { get; set; }
        public virtual string Subtitles { get; set; }
        public virtual bool DrmEncrypted { get; set; }
        public virtual List<ScreenshotItem> Screenshots { get; set; }
    }

    public partial class ScreenshotItem
    {
        public virtual string LargeFilepathS3 { get; set; }
        public virtual string ThumbFilepathS3 { get; set; }
        public virtual decimal Order { get; set; }
        public virtual string Description { get; set; }
    }

    public partial class SeriesItem
    {
        public virtual string Id { get; set; }
        public virtual string Title { get; set; }
    }

    public partial class SubTopic
    {
        public virtual string Id { get; set; }
        public virtual string Title { get; set; }
        public virtual int ResourceCount { get; set; }
        public virtual ICollection<ResourceItem> ResourceItems { get; set; }
    }

    public partial class Tag
    {
        public virtual string Id { get; set; }
        public virtual string Title { get; set; }
    }

    public partial class WorkoutCategory
    {
        public virtual string Id { get; set; }
        public virtual string Name { get; set; }
        public virtual string WorkoutCategoryImage { get; set; }
        public virtual ICollection<ResourceItem> ResourceItems { get; set; }
    }

}

namespace ASH.ResourceLibrary.Interfaces.ServiceModels
{
    public partial class BasicResourceLibraryRequest
    {
        public virtual int ResourceLibraryMemberId { get; set; }
    }

    public partial class WorkoutCategoriesRequest
        : BasicResourceLibraryRequest
    {
        public WorkoutCategoriesRequest()
        {
            WorkoutCategories = new List<WorkoutCategory>{};
        }

        public virtual List<WorkoutCategory> WorkoutCategories { get; set; }
        public virtual string WorkoutCategoryId { get; set; }
    }

    public partial class WorkoutCategoriesResponse
    {
        public WorkoutCategoriesResponse()
        {
            WorkoutCategories = new List<WorkoutCategory>{};
        }

        public virtual List<WorkoutCategory> WorkoutCategories { get; set; }
        public virtual Meta Meta { get; set; }
    }

}

C# WorkoutCategoriesRequest DTOs

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

HTTP + 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>