GET,POST | /favorites | Use to get a list Resource Items |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static 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 Boolean digitalFitness = 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")
public Boolean healthLibrary = 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")
public Boolean vptr = 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")
public Boolean wellbeing = 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")
public Boolean health = null;
public String limit = null;
public String offset = null;
public Boolean isDigitalFitness() { return digitalFitness; }
public FavoritesRequest setDigitalFitness(Boolean value) { this.digitalFitness = value; return this; }
public Boolean isHealthLibrary() { return healthLibrary; }
public FavoritesRequest setHealthLibrary(Boolean value) { this.healthLibrary = value; return this; }
public Boolean isVptr() { return vptr; }
public FavoritesRequest setVptr(Boolean value) { this.vptr = value; return this; }
public Boolean isWellbeing() { return wellbeing; }
public FavoritesRequest setWellbeing(Boolean value) { this.wellbeing = value; return this; }
public Boolean isHealth() { return health; }
public FavoritesRequest setHealth(Boolean value) { this.health = value; return this; }
public String getLimit() { return limit; }
public FavoritesRequest setLimit(String value) { this.limit = value; return this; }
public String getOffset() { return offset; }
public FavoritesRequest setOffset(String value) { this.offset = value; return this; }
}
public static class BasicResourceLibraryRequest
{
public Integer resourceLibraryMemberId = null;
public Integer getResourceLibraryMemberId() { return resourceLibraryMemberId; }
public BasicResourceLibraryRequest setResourceLibraryMemberId(Integer value) { this.resourceLibraryMemberId = value; return this; }
}
public static class ResourceItemsLiteResponse implements IResourceItemsLiteResponse
{
public ArrayList<ResourceCard> resourceItems = null;
public Meta meta = null;
public ArrayList<ResourceCard> getResourceItems() { return resourceItems; }
public ResourceItemsLiteResponse setResourceItems(ArrayList<ResourceCard> value) { this.resourceItems = value; return this; }
public Meta getMeta() { return meta; }
public ResourceItemsLiteResponse setMeta(Meta value) { this.meta = value; return this; }
}
public static class ResourceCard
{
public String id = null;
public String title = null;
public String description = null;
public String descriptionSummary = null;
public String type = null;
public String content = null;
public Boolean isComplete = null;
public Boolean isFavorite = null;
public Boolean isImplicitlyComplete = null;
public String mediaPath = null;
public Boolean isConfirmable = null;
public Boolean isWcagCompliant = null;
public String duration = null;
public String preview = null;
public Integer calories = null;
public String instructor = null;
public String thumbnail = null;
public String difficulty = null;
public ArrayList<Tag> tags = null;
public String subtitles = null;
public ArrayList<ScreenshotItem> screenshots = null;
public Boolean drmEncrypted = null;
public String getId() { return id; }
public ResourceCard setId(String value) { this.id = value; return this; }
public String getTitle() { return title; }
public ResourceCard setTitle(String value) { this.title = value; return this; }
public String getDescription() { return description; }
public ResourceCard setDescription(String value) { this.description = value; return this; }
public String getDescriptionSummary() { return descriptionSummary; }
public ResourceCard setDescriptionSummary(String value) { this.descriptionSummary = value; return this; }
public String getType() { return type; }
public ResourceCard setType(String value) { this.type = value; return this; }
public String getContent() { return content; }
public ResourceCard setContent(String value) { this.content = value; return this; }
public Boolean getIsComplete() { return isComplete; }
public ResourceCard setIsComplete(Boolean value) { this.isComplete = value; return this; }
public Boolean getIsFavorite() { return isFavorite; }
public ResourceCard setIsFavorite(Boolean value) { this.isFavorite = value; return this; }
public Boolean getIsImplicitlyComplete() { return isImplicitlyComplete; }
public ResourceCard setIsImplicitlyComplete(Boolean value) { this.isImplicitlyComplete = value; return this; }
public String getMediaPath() { return mediaPath; }
public ResourceCard setMediaPath(String value) { this.mediaPath = value; return this; }
public Boolean getIsConfirmable() { return isConfirmable; }
public ResourceCard setIsConfirmable(Boolean value) { this.isConfirmable = value; return this; }
public Boolean getIsWcagCompliant() { return isWcagCompliant; }
public ResourceCard setIsWcagCompliant(Boolean value) { this.isWcagCompliant = value; return this; }
public String getDuration() { return duration; }
public ResourceCard setDuration(String value) { this.duration = value; return this; }
public String getPreview() { return preview; }
public ResourceCard setPreview(String value) { this.preview = value; return this; }
public Integer getCalories() { return calories; }
public ResourceCard setCalories(Integer value) { this.calories = value; return this; }
public String getInstructor() { return instructor; }
public ResourceCard setInstructor(String value) { this.instructor = value; return this; }
public String getThumbnail() { return thumbnail; }
public ResourceCard setThumbnail(String value) { this.thumbnail = value; return this; }
public String getDifficulty() { return difficulty; }
public ResourceCard setDifficulty(String value) { this.difficulty = value; return this; }
public ArrayList<Tag> getTags() { return tags; }
public ResourceCard setTags(ArrayList<Tag> value) { this.tags = value; return this; }
public String getSubtitles() { return subtitles; }
public ResourceCard setSubtitles(String value) { this.subtitles = value; return this; }
public ArrayList<ScreenshotItem> getScreenshots() { return screenshots; }
public ResourceCard setScreenshots(ArrayList<ScreenshotItem> value) { this.screenshots = value; return this; }
public Boolean isDrmEncrypted() { return drmEncrypted; }
public ResourceCard setDrmEncrypted(Boolean value) { this.drmEncrypted = value; return this; }
}
public static class Tag
{
public String id = null;
public String title = null;
public String getId() { return id; }
public Tag setId(String value) { this.id = value; return this; }
public String getTitle() { return title; }
public Tag setTitle(String value) { this.title = value; return this; }
}
public static class ScreenshotItem
{
public String largeFilepathS3 = null;
public String thumbFilepathS3 = null;
public BigDecimal order = null;
public String description = null;
public String getLargeFilepathS3() { return largeFilepathS3; }
public ScreenshotItem setLargeFilepathS3(String value) { this.largeFilepathS3 = value; return this; }
public String getThumbFilepathS3() { return thumbFilepathS3; }
public ScreenshotItem setThumbFilepathS3(String value) { this.thumbFilepathS3 = value; return this; }
public BigDecimal getOrder() { return order; }
public ScreenshotItem setOrder(BigDecimal value) { this.order = value; return this; }
public String getDescription() { return description; }
public ScreenshotItem setDescription(String value) { this.description = value; return this; }
}
public static class Meta
{
public Integer resourceCount = null;
public String title = null;
public Integer getResourceCount() { return resourceCount; }
public Meta setResourceCount(Integer value) { this.resourceCount = value; return this; }
public String getTitle() { return title; }
public Meta setTitle(String value) { this.title = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
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/xml
Content-Type: application/xml
Content-Length: length
<FavoritesRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ASH.ResourceLibrary.Interfaces.ServiceModels">
<ResourceLibraryMemberId>0</ResourceLibraryMemberId>
<DigitalFitness>false</DigitalFitness>
<Health>false</Health>
<HealthLibrary>false</HealthLibrary>
<Limit>String</Limit>
<Offset>String</Offset>
<Vptr>false</Vptr>
<Wellbeing>false</Wellbeing>
</FavoritesRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <ResourceItemsLiteResponse 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> <ResourceItems xmlns:d2p1="http://schemas.datacontract.org/2004/07/ASH.ResourceLibrary.Interfaces.Models"> <d2p1:ResourceCard> <d2p1:Calories>0</d2p1:Calories> <d2p1:Content>String</d2p1:Content> <d2p1:Description>String</d2p1:Description> <d2p1:DescriptionSummary>String</d2p1:DescriptionSummary> <d2p1:Difficulty>String</d2p1:Difficulty> <d2p1:DrmEncrypted>false</d2p1:DrmEncrypted> <d2p1:Duration>String</d2p1:Duration> <d2p1:Id>String</d2p1:Id> <d2p1:Instructor>String</d2p1:Instructor> <d2p1:IsComplete>false</d2p1:IsComplete> <d2p1:IsConfirmable>false</d2p1:IsConfirmable> <d2p1:IsFavorite>false</d2p1:IsFavorite> <d2p1:IsImplicitlyComplete>false</d2p1:IsImplicitlyComplete> <d2p1:IsWcagCompliant>false</d2p1:IsWcagCompliant> <d2p1:MediaPath>String</d2p1:MediaPath> <d2p1:Preview>String</d2p1:Preview> <d2p1:Screenshots> <d2p1:ScreenshotItem> <d2p1:Description>String</d2p1:Description> <d2p1:LargeFilepathS3>String</d2p1:LargeFilepathS3> <d2p1:Order>0</d2p1:Order> <d2p1:ThumbFilepathS3>String</d2p1:ThumbFilepathS3> </d2p1:ScreenshotItem> </d2p1:Screenshots> <d2p1:Subtitles>String</d2p1:Subtitles> <d2p1:Tags> <d2p1:Tag> <d2p1:_x003C_Id_x003E_k__BackingField>String</d2p1:_x003C_Id_x003E_k__BackingField> <d2p1:_x003C_Title_x003E_k__BackingField>String</d2p1:_x003C_Title_x003E_k__BackingField> </d2p1:Tag> </d2p1:Tags> <d2p1:Thumbnail>String</d2p1:Thumbnail> <d2p1:Title>String</d2p1:Title> <d2p1:Type>String</d2p1:Type> </d2p1:ResourceCard> </ResourceItems> </ResourceItemsLiteResponse>