GET | /featuredTopics | Use to get Resource Library topics with featured resources |
---|
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BasicResourceLibraryRequest:
resource_library_member_id: Optional[int] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class FeaturedTopicsRequest(BasicResourceLibraryRequest):
pass
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Tag:
id: Optional[str] = None
title: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ScreenshotItem:
large_filepath_s3: Optional[str] = None
thumb_filepath_s3: Optional[str] = None
order: Optional[Decimal] = None
description: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ResourceCard:
id: Optional[str] = None
title: Optional[str] = None
description: Optional[str] = None
description_summary: Optional[str] = None
type: Optional[str] = None
content: Optional[str] = None
is_complete: Optional[bool] = None
is_favorite: Optional[bool] = None
is_implicitly_complete: Optional[bool] = None
media_path: Optional[str] = None
is_confirmable: Optional[bool] = None
is_wcag_compliant: Optional[bool] = None
duration: Optional[str] = None
preview: Optional[str] = None
calories: Optional[int] = None
instructor: Optional[str] = None
thumbnail: Optional[str] = None
difficulty: Optional[str] = None
tags: Optional[List[Tag]] = None
subtitles: Optional[str] = None
screenshots: Optional[List[ScreenshotItem]] = None
drm_encrypted: Optional[bool] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SubtopicLite:
id: Optional[str] = None
title: Optional[str] = None
resource_count: Optional[int] = None
resource_items: Optional[List[ResourceCard]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class TopicLite:
id: Optional[str] = None
subtopic_items: Optional[List[SubtopicLite]] = None
resource_items: Optional[List[ResourceCard]] = None
title: Optional[str] = None
is_visible: Optional[str] = None
resource_count: Optional[int] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class FeaturedTopicsResponse:
featured_topics: Optional[List[TopicLite]] = None
Python FeaturedTopicsRequest DTOs
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.
GET /featuredTopics HTTP/1.1 Host: resourcelibrary.api.ashcompanies.com Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <FeaturedTopicsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ASH.ResourceLibrary.Interfaces.ServiceModels"> <FeaturedTopics xmlns:d2p1="http://schemas.datacontract.org/2004/07/ASH.ResourceLibrary.Interfaces.Models" i:nil="true" /> </FeaturedTopicsResponse>