@druid-sh/sdk
Version:
Druid.sh SDK for rendering blog content with SSR support
21 lines (20 loc) • 765 B
TypeScript
import { BlogConfig, BlogListResponse, BlogPost, BlogPostResponse, Tag, Slug } from "./types";
declare class DruidClient {
private readonly config;
private client;
siteName: string;
constructor(config: BlogConfig);
private fetchTag;
private fetchPosts;
private fetchPostsByTag;
private fetchTags;
private fetchSlugs;
fetchPost(projectId: string, slug: string): Promise<BlogPost>;
getPosts(page?: number, limit?: number): Promise<BlogListResponse>;
getPost(slug: string): Promise<BlogPostResponse>;
getPostsByTag(tag: string, page?: number, limit?: number): Promise<BlogListResponse>;
getTags(): Promise<Tag[]>;
getSlugs(): Promise<Slug[]>;
getTag(tag: string): Promise<Tag>;
}
export { DruidClient };