API Reference
BlogClient
The main class exported by the package. Wraps the blogjs API and exposes typed async methods.
Code
import { BlogClient } from "blogjs-space";
const client = new BlogClient({
apiKey: "XXXX-XXXX-XXXX-XXXXXXXXXXXX",
});Constructor options
| Option | Type | Required | Description |
|---|---|---|---|
| apiKey | string | required | Authorization header sent with every request. |
Methods
asyncgetBlogs(pagination?)
Fetches a paginated list of blogs with optional full-text search.
asyncgetBlogBySlug(slug)
Fetches a single blog including its full content field, by exact slug match.