Interface Posts

Interface for retrieving blog posts.

Provides methods for paginated access and individual entry retrieval.

interface Posts {
    createsThumbnail(source: BasePostEntry, size: number | ImageSize<number>, ratio?: string | number): string;
    withCategories(options: WithCategoriesPostsOptionsSummary): Promise<WithCategoriesPostsResultSummary>;
    withCategories(options: WithCategoriesPostsOptions<PostsFeedOptions<FeedRoute>>): Promise<WithCategoriesPostsResult>;
    byId<R>(options: ByIdPostsOptions<R>): Promise<ByIdResult<"posts", R>>;
    byId(options: ByIdPostsOptionsSummary): Promise<PostsEntryBlogSummary>;
    (options: PostsOptionsSummary): Promise<PostsHandler<"summary">>;
    <R>(options: PostsOptions<R>): Promise<PostsHandler<R>>;
}

Methods

  • Creates the thumbnail url of a post.

    Parameters

    • source: BasePostEntry

      The post source.

    • size: number | ImageSize<number>

      The size of the thumbnail.

    • Optionalratio: string | number

      The ratio of the thumbnail.

    Returns string

    The thumbnail url.