ASH.ResourceLibrary.WebApi

<back to all web services

FavoritesRequest

Requires Authentication
The following routes are available for this service:
GET,POST/favoritesUse to get a list Resource Items
import java.math.*
import java.util.*
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*


open class FavoritesRequest : BasicResourceLibraryRequest()
{
    /**
    * Set it to true if requesting saved resources only from digital library
    */
    @ApiMember(Description="Set it to true if requesting saved resources only from digital library")
    var digitalFitness:Boolean? = null

    /**
    * Set it to true if requesting saved resources only from health library
    */
    @ApiMember(Description="Set it to true if requesting saved resources only from health library")
    var healthLibrary:Boolean? = null

    /**
    * Set it to true if requesting saved resources only from vptr
    */
    @ApiMember(Description="Set it to true if requesting saved resources only from vptr")
    var vptr:Boolean? = null

    /**
    * Set it to true if requesting saved resources only from wellbeing
    */
    @ApiMember(Description="Set it to true if requesting saved resources only from wellbeing")
    var wellbeing:Boolean? = null

    /**
    * Set it to true if requesting saved resources only from health
    */
    @ApiMember(Description="Set it to true if requesting saved resources only from health")
    var health:Boolean? = null

    var limit:String? = null
    var offset:String? = null
}

open class BasicResourceLibraryRequest
{
    var resourceLibraryMemberId:Int? = null
}

open class ResourceItemsLiteResponse : IResourceItemsLiteResponse
{
    var resourceItems:ArrayList<ResourceCard> = ArrayList<ResourceCard>()
    var meta:Meta? = null
}

open class ResourceCard
{
    var id:String? = null
    var title:String? = null
    var description:String? = null
    var descriptionSummary:String? = null
    @SerializedName("type") var Type:String? = null
    var content:String? = null
    var isComplete:Boolean? = null
    var isFavorite:Boolean? = null
    var isImplicitlyComplete:Boolean? = null
    var mediaPath:String? = null
    var isConfirmable:Boolean? = null
    var isWcagCompliant:Boolean? = null
    var duration:String? = null
    var preview:String? = null
    var calories:Int? = null
    var instructor:String? = null
    var thumbnail:String? = null
    var difficulty:String? = null
    var tags:ArrayList<Tag> = ArrayList<Tag>()
    var subtitles:String? = null
    var screenshots:ArrayList<ScreenshotItem> = ArrayList<ScreenshotItem>()
    var drmEncrypted:Boolean? = null
}

open class Tag
{
    var id:String? = null
    var title:String? = null
}

open class ScreenshotItem
{
    var largeFilepathS3:String? = null
    var thumbFilepathS3:String? = null
    var order:BigDecimal? = null
    var description:String? = null
}

open class Meta
{
    var resourceCount:Int? = null
    var title:String? = null
}

Kotlin FavoritesRequest 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.

POST /favorites HTTP/1.1 
Host: resourcelibrary.api.ashcompanies.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"digitalFitness":false,"healthLibrary":false,"vptr":false,"wellbeing":false,"health":false,"limit":"String","offset":"String","resourceLibraryMemberId":0}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"resourceItems":[{"id":"String","title":"String","description":"String","descriptionSummary":"String","type":"String","content":"String","isComplete":false,"isFavorite":false,"isImplicitlyComplete":false,"mediaPath":"String","isConfirmable":false,"isWcagCompliant":false,"duration":"String","preview":"String","calories":0,"instructor":"String","thumbnail":"String","difficulty":"String","tags":[{"id":"String","title":"String"}],"subtitles":"String","screenshots":[{"largeFilepathS3":"String","thumbFilepathS3":"String","order":0,"description":"String"}],"drmEncrypted":false}],"meta":{"resourceCount":0,"title":"String"}}