GET,POST | /favorites | Use to get a list Resource Items |
---|
export class BasicResourceLibraryRequest
{
public resourceLibraryMemberId?: number;
public constructor(init?: Partial<BasicResourceLibraryRequest>) { (Object as any).assign(this, init); }
}
export class Tag
{
public id?: string;
public title?: string;
public constructor(init?: Partial<Tag>) { (Object as any).assign(this, init); }
}
export class ScreenshotItem
{
public largeFilepathS3?: string;
public thumbFilepathS3?: string;
public order?: number;
public description?: string;
public constructor(init?: Partial<ScreenshotItem>) { (Object as any).assign(this, init); }
}
export class ResourceCard
{
public id?: string;
public title?: string;
public description?: string;
public descriptionSummary?: string;
public type?: string;
public content?: string;
public isComplete?: boolean;
public isFavorite?: boolean;
public isImplicitlyComplete?: boolean;
public mediaPath?: string;
public isConfirmable?: boolean;
public isWcagCompliant?: boolean;
public duration?: string;
public preview?: string;
public calories?: number;
public instructor?: string;
public thumbnail?: string;
public difficulty?: string;
public tags?: Tag[];
public subtitles?: string;
public screenshots?: ScreenshotItem[];
public drmEncrypted?: boolean;
public constructor(init?: Partial<ResourceCard>) { (Object as any).assign(this, init); }
}
export class Meta
{
public resourceCount?: number;
public title?: string;
public constructor(init?: Partial<Meta>) { (Object as any).assign(this, init); }
}
export class ResourceItemsLiteResponse implements IResourceItemsLiteResponse
{
public resourceItems?: ResourceCard[];
public meta?: Meta;
public constructor(init?: Partial<ResourceItemsLiteResponse>) { (Object as any).assign(this, init); }
}
export class FavoritesRequest extends 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")
public digitalFitness?: boolean;
/**
* 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")
public healthLibrary?: boolean;
/**
* Set it to true if requesting saved resources only from vptr
*/
// @ApiMember(Description="Set it to true if requesting saved resources only from vptr")
public vptr?: boolean;
/**
* Set it to true if requesting saved resources only from wellbeing
*/
// @ApiMember(Description="Set it to true if requesting saved resources only from wellbeing")
public wellbeing?: boolean;
/**
* Set it to true if requesting saved resources only from health
*/
// @ApiMember(Description="Set it to true if requesting saved resources only from health")
public health?: boolean;
public limit?: string;
public offset?: string;
public constructor(init?: Partial<FavoritesRequest>) { super(init); (Object as any).assign(this, init); }
}
TypeScript FavoritesRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
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: text/csv
Content-Type: text/csv
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: text/csv 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"}}