# @deox/blogger-feed

> A blogger feed API client.

Latest version **0.1.1** (published 2026-05-20) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @deox/blogger-feed
pnpm add @deox/blogger-feed
yarn add @deox/blogger-feed
bun add @deox/blogger-feed
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2026-05-20 |
| First published | 2024-05-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 262.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 9 |
| Author | Deo Kumar |
| Maintainers | kumardeo |
| Keywords | blogger, blogger-feed |

## Links

- npm: https://www.npmjs.com/package/@deox/blogger-feed
- Repository: https://github.com/kumardeo/deox
- Homepage: https://github.com/kumardeo/deox/tree/main/packages/blogger-feed#readme
- Issues: https://github.com/kumardeo/deox/issues
- npm.io page: https://npm.io/package/@deox/blogger-feed

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [@luma.gl/experimental](https://npm.io/package/@luma.gl/experimental.md) — 77.1K weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads

## Recent versions

- 0.1.1 (latest) — 2026-05-20
- 0.1.0 — 2026-05-20
- 0.0.12 — 2026-04-30
- 0.0.11 — 2026-01-10
- 0.0.10 — 2025-09-25
- 0.0.9 — 2025-02-01
- 0.0.8 — 2025-01-27
- 0.0.7 — 2025-01-13
- 0.0.6 — 2024-09-30
- 0.0.5 — 2024-08-20
- 0.0.4 — 2024-05-26
- 0.0.3 — 2024-05-12
- 0.0.2 — 2024-05-12
- 0.0.1 — 2024-05-10

## README

# @deox/blogger-feed

A lightweight, type-safe Blogger feed API client for fetching Blogger blog metadata, posts, pages, comments, and pagination data.

## Features

- Fetch blog metadata, recent posts, pages, and comments
- Strong TypeScript support with exported response models
- Built for Node.js and browser environments
- Supports ESM and CommonJS imports
- Automatic pagination handling with `next()` and `previous()` helpers
- Optional JSONP mode for browser usage

## Installation

Install the package using your preferred package manager:

```bash
npm install @deox/blogger-feed
```

```bash
yarn add @deox/blogger-feed
```

```bash
pnpm add @deox/blogger-feed
```

## Quick Start

Import the client and create a new `BloggerFeed` instance with a blog URL or Blogger blog ID.

```ts
import { BloggerFeed } from "@deox/blogger-feed";

const feed = new BloggerFeed("https://example-blog.blogspot.com");
```

## API Reference

### `new BloggerFeed(urlOrId, options?)`

Creates a new Blogger feed client.

- `urlOrId: string | URL` — Blogger blog URL or numeric blog ID
- `options.jsonp?: boolean` — enable JSONP callbacks in browser environments

Example:

```ts
const feed = new BloggerFeed("https://example-blog.blogspot.com", {
  jsonp: false,
});
```

### Static exports

- `BloggerFeed.SDKError` — SDK error type
- `BloggerFeed.SDKRequestError` — request error type
- `BloggerFeed.parseFeed` — parse raw Blogger feed objects

### `feed.blog.get()`

Fetch blog metadata.

```ts
const blog = await feed.blog.get();
if (!blog) {
  console.log("Blog not found");
  return;
}
console.log(blog.title, blog.url);
```

If the blog cannot be found, this method returns `null`.

### `feed.posts.list(options?)`

List posts with optional filters.

```ts
const postsPage = await feed.posts.list({
  maxResults: 5,
  orderBy: "published",
  label: "javascript",
});
```

Supported options:

- `maxResults?: number`
- `startIndex?: number`
- `orderBy?: 'published' | 'updated'`
- `publishedMin?: Date | string`
- `publishedMax?: Date | string`
- `updatedMin?: Date | string`
- `updatedMax?: Date | string`
- `label?: string`
- `summary?: boolean`

### `feed.posts.get(postId, options?)`

Retrieve a single post by ID.

```ts
const post = await feed.posts.get("12345");
if (!post) {
  console.log("Post not found");
}
```

If the post is not found, this method returns `null`.

Supported options:

- `summary?: boolean`

### `feed.posts.query(query, options?)`

Search posts with query.

```ts
const searchPage = await feed.posts.query("hello", { maxResults: 10 });
```

### `feed.pages.list(options?)`

List pages for the blog.

```ts
const pagesPage = await feed.pages.list({ maxResults: 10 });
```

Supported options:

- `maxResults?: number`
- `startIndex?: number`
- `orderBy?: 'published' | 'updated'`
- `publishedMin?: Date | string`
- `publishedMax?: Date | string`
- `updatedMin?: Date | string`
- `updatedMax?: Date | string`
- `summary?: boolean`

### `feed.pages.get(pageId, options?)`

Retrieve a single page by ID.

```ts
const page = await feed.pages.get("67890");
if (!page) {
  console.log("Page not found");
}
```

If the page is not found, this method returns `null`.

Supported options:

- `summary?: boolean`

### `feed.comments.list(options?)`

List comments for the blog or a specific post.

```ts
const commentsPage = await feed.comments.list({
  maxResults: 20,
  postId: "12345",
});
```

Supported options:

- `maxResults?: number`
- `startIndex?: number`
- `orderBy?: 'published' | 'updated'`
- `publishedMin?: Date | string`
- `publishedMax?: Date | string`
- `updatedMin?: Date | string`
- `updatedMax?: Date | string`
- `summary?: boolean`
- `postId?: string`

### `feed.comments.get(postId, commentId, options?)`

Retrieve a single comment by post and comment ID.

```ts
const comment = await feed.comments.get("12345", "67890");
if (!comment) {
  console.log("Comment not found");
}
```

If the comment is not found, this method returns `null`.

Supported options:

- `summary?: boolean`

## Pagination

List methods return a pagination object, not a bare array. The returned object includes:

- `items` — the current page of entries
- `itemsPerPage` — number of items returned in this page
- `startIndex` — index of the first item in the current page
- `totalResults` — total available entries
- `selfUrl` — current page URL
- `previousUrl` — previous page URL, if available
- `nextUrl` — next page URL, if available
- `next()` — fetch the next page or `null`
- `previous()` — fetch the previous page or `null`

Example:

```ts
const postsPage = await feed.posts.list({ maxResults: 5 });
console.log(postsPage.items.length);

const nextPage = await postsPage.next();
if (nextPage) {
  console.log(nextPage.items.length, "more posts");
}
```

## Types

The package exports helpful type definitions for TypeScript users, including:

- `Blog`
- `Post`
- `Comment`
- `Author`
- `Link`
- `Extended`
- `PostCommentInfo`
- `Feed`

These types describe the structure of Blogger feed responses and are available from the package exports.

## Browser Usage

To use the library in browser environments where CORS prevents direct JSON requests, enable JSONP mode:

```ts
const feed = new BloggerFeed("https://example-blog.blogspot.com", {
  jsonp: true,
});
```

> Note: JSONP mode is only supported in browser environments.

---
_Source: https://npm.io/package/@deox/blogger-feed · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
