ASH.ResourceLibrary.WebApi

<back to all web services

TopicRequest

Requires Authentication
The following routes are available for this service:
GET/topics/{topicid}Use to get Resource Library Topic
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 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 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 SubtopicLite
    {
        public virtual string Id { get; set; }
        public virtual string Title { get; set; }
        public virtual int ResourceCount { get; set; }
        public virtual ICollection<ResourceCard> ResourceItems { get; set; }
    }

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

    public partial class TopicLite
    {
        public virtual string Id { get; set; }
        public virtual ICollection<SubtopicLite> SubtopicItems { get; set; }
        public virtual ICollection<ResourceCard> ResourceItems { get; set; }
        public virtual string Title { get; set; }
        public virtual string IsVisible { get; set; }
        public virtual int ResourceCount { get; set; }
    }

}

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

    public partial class TopicRequest
        : BasicResourceLibraryRequest
    {
        public virtual bool IncludeCompletionStatus { get; set; }
        public virtual string Limit { get; set; }
        public virtual string Offset { get; set; }
        public virtual string TopicId { get; set; }
        public virtual bool IsMobile { get; set; }
        ///<summary>
        ///Set it to true if the topic being requested belogs to digital fitness. Don't set it if unsure.
        ///</summary>
        [ApiMember(Description="Set it to true if the topic being requested belogs to digital fitness. Don't set it if unsure.")]
        public virtual bool DigitalFitness { get; set; }
    }

    public partial class TopicResponse
    {
        public virtual TopicLite Topic { get; set; }
    }

}

C# TopicRequest 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 /topics/{topicid} HTTP/1.1 
Host: resourcelibrary.api.ashcompanies.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<TopicResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ASH.ResourceLibrary.Interfaces.ServiceModels">
  <Topic xmlns:d2p1="http://schemas.datacontract.org/2004/07/ASH.ResourceLibrary.Interfaces.Models">
    <d2p1:Id>String</d2p1:Id>
    <d2p1:IsVisible>String</d2p1:IsVisible>
    <d2p1:ResourceCount>0</d2p1:ResourceCount>
    <d2p1:ResourceItems i:nil="true" />
    <d2p1:SubtopicItems i:nil="true" />
    <d2p1:Title>String</d2p1:Title>
  </Topic>
</TopicResponse>