ASH.ResourceLibrary.WebApi

<back to all web services

ResourceItemSearchRequest

Requires Authentication
The following routes are available for this service:
GET/searchResultsUse to search Resource Items
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 ResourceItemForSearch
    {
        public ResourceItemForSearch()
        {
            Categories = new List<string>{};
            CategoryIndexes = new List<string>{};
            Tags = new List<string>{};
        }

        public virtual string Id { get; set; }
        public virtual string Type { get; set; }
        public virtual List<string> Categories { get; set; }
        public virtual List<string> CategoryIndexes { get; set; }
        public virtual string Title { get; set; }
        public virtual string Description { get; set; }
        public virtual string DescriptionSummary { get; set; }
        public virtual string Content { get; set; }
        public virtual List<string> Tags { get; set; }
        public virtual bool IsComplete { get; set; }
        public virtual bool IsFavorite { get; set; }
        public virtual bool IsImplicitlyComplete { get; set; }
        public virtual string Transcript { get; set; }
        public virtual string Thumbnail { get; set; }
        public virtual string Difficulty { get; set; }
        public virtual string Duration { get; set; }
        public virtual string MediaPath { get; set; }
    }

    public partial class SearchResult
    {
        public SearchResult()
        {
            ResourceItems = new List<ResourceItemForSearch>{};
            SearchItems = new List<ResourceItemForSearch>{};
            Tags = new List<Tag>{};
        }

        public virtual string Id { get; set; }
        public virtual List<ResourceItemForSearch> ResourceItems { get; set; }
        public virtual List<ResourceItemForSearch> SearchItems { get; set; }
        public virtual List<Tag> Tags { get; set; }
        public virtual long ItemCount { get; set; }
    }

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

}

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

    public partial class ResourceItemSearchRequest
        : BasicResourceLibraryRequest
    {
        public ResourceItemSearchRequest()
        {
            Tags = new List<string>{};
        }

        public virtual string Request { get; set; }
        public virtual List<string> Tags { get; set; }
        public virtual string CategoryId { get; set; }
        public virtual int Offset { get; set; }
        public virtual int Limit { get; set; }
        public virtual bool digitalFitness { get; set; }
    }

    public partial class ResourceItemSearchResponse
    {
        public virtual SearchResult SearchResults { get; set; }
    }

}

C# ResourceItemSearchRequest 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.

GET /searchResults HTTP/1.1 
Host: resourcelibrary.api.ashcompanies.com 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"searchResults":{"id":"String","resourceItems":[{"id":"String","type":"String","categories":["String"],"categoryIndexes":["String"],"title":"String","description":"String","descriptionSummary":"String","content":"String","tags":["String"],"isComplete":false,"isFavorite":false,"isImplicitlyComplete":false,"transcript":"String","thumbnail":"String","difficulty":"String","duration":"String","mediaPath":"String"}],"searchItems":[{"id":"String","type":"String","categories":["String"],"categoryIndexes":["String"],"title":"String","description":"String","descriptionSummary":"String","content":"String","tags":["String"],"isComplete":false,"isFavorite":false,"isImplicitlyComplete":false,"transcript":"String","thumbnail":"String","difficulty":"String","duration":"String","mediaPath":"String"}],"tags":[{"id":"String","title":"String"}],"itemCount":0}}