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 Foundation
import ServiceStack

public class DigitalFitnessContentRequest : BasicResourceLibraryRequest
{
    required public init(){ super.init() }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
    }
}

public class BasicResourceLibraryRequest : Codable
{
    public var resourceLibraryMemberId:Int?

    required public init(){}
}

public class DigitalFitnessResourcesResponse : Codable
{
    public var digitalFitnessResources:[TopicLite] = []

    required public init(){}
}

public class TopicLite : Codable
{
    public var id:String?
    public var subtopicItems:[SubtopicLite] = []
    public var resourceItems:[ResourceCard] = []
    public var title:String?
    public var isVisible:String?
    public var resourceCount:Int?

    required public init(){}
}

public class SubtopicLite : Codable
{
    public var id:String?
    public var title:String?
    public var resourceCount:Int?
    public var resourceItems:[ResourceCard] = []

    required public init(){}
}

public class ResourceCard : Codable
{
    public var id:String?
    public var title:String?
    public var Description:String?
    public var descriptionSummary:String?
    public var type:String?
    public var content:String?
    public var isComplete:Bool?
    public var isFavorite:Bool?
    public var isImplicitlyComplete:Bool?
    public var mediaPath:String?
    public var isConfirmable:Bool?
    public var isWcagCompliant:Bool?
    public var duration:String?
    public var preview:String?
    public var calories:Int?
    public var instructor:String?
    public var thumbnail:String?
    public var difficulty:String?
    public var tags:[Tag] = []
    public var subtitles:String?
    public var screenshots:[ScreenshotItem] = []
    public var drmEncrypted:Bool?

    required public init(){}
}

public class Tag : Codable
{
    public var id:String?
    public var title:String?

    required public init(){}
}

public class ScreenshotItem : Codable
{
    public var largeFilepathS3:String?
    public var thumbFilepathS3:String?
    public var order:Double?
    public var Description:String?

    required public init(){}
}


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

<DigitalFitnessResourcesResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ASH.ResourceLibrary.Interfaces.ServiceModels">
  <DigitalFitnessResources xmlns:d2p1="http://schemas.datacontract.org/2004/07/ASH.ResourceLibrary.Interfaces.Models">
    <d2p1:TopicLite>
      <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>
    </d2p1:TopicLite>
  </DigitalFitnessResources>
</DigitalFitnessResourcesResponse>