GET | /searchResults | Use to search Resource Items |
---|
namespace ASH.ResourceLibrary.Interfaces.Models
open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<AllowNullLiteral>]
type BasicResourceLibraryRequest() =
member val ResourceLibraryMemberId:Int32 = new Int32() with get,set
[<AllowNullLiteral>]
type ResourceItemSearchRequest() =
inherit BasicResourceLibraryRequest()
member val Request:String = null with get,set
member val Tags:ResizeArray<String> = new ResizeArray<String>() with get,set
member val CategoryId:String = null with get,set
member val Offset:Int32 = new Int32() with get,set
member val Limit:Int32 = new Int32() with get,set
member val digitalFitness:Boolean = new Boolean() with get,set
[<AllowNullLiteral>]
type ResourceItemForSearch() =
member val Id:String = null with get,set
member val Type:String = null with get,set
member val Categories:ResizeArray<String> = new ResizeArray<String>() with get,set
member val CategoryIndexes:ResizeArray<String> = new ResizeArray<String>() with get,set
member val Title:String = null with get,set
member val Description:String = null with get,set
member val DescriptionSummary:String = null with get,set
member val Content:String = null with get,set
member val Tags:ResizeArray<String> = new ResizeArray<String>() with get,set
member val IsComplete:Boolean = new Boolean() with get,set
member val IsFavorite:Boolean = new Boolean() with get,set
member val IsImplicitlyComplete:Boolean = new Boolean() with get,set
member val Transcript:String = null with get,set
member val Thumbnail:String = null with get,set
member val Difficulty:String = null with get,set
member val Duration:String = null with get,set
member val MediaPath:String = null with get,set
[<AllowNullLiteral>]
type Tag() =
member val Id:String = null with get,set
member val Title:String = null with get,set
[<AllowNullLiteral>]
type SearchResult() =
member val Id:String = null with get,set
member val ResourceItems:ResizeArray<ResourceItemForSearch> = new ResizeArray<ResourceItemForSearch>() with get,set
member val SearchItems:ResizeArray<ResourceItemForSearch> = new ResizeArray<ResourceItemForSearch>() with get,set
member val Tags:ResizeArray<Tag> = new ResizeArray<Tag>() with get,set
member val ItemCount:Int64 = new Int64() with get,set
[<AllowNullLiteral>]
type ResourceItemSearchResponse() =
member val SearchResults:SearchResult = null with get,set
F# ResourceItemSearchRequest 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.
GET /searchResults HTTP/1.1 Host: resourcelibrary.api.ashcompanies.com Accept: text/csv
HTTP/1.1 200 OK Content-Type: text/csv 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}}