Skip to content

Latest commit

 

History

History
58 lines (36 loc) · 1 KB

README.md

File metadata and controls

58 lines (36 loc) · 1 KB

@deox/blogger-feed

A blogger feed API client.

Installation

Install the package by running the following command in terminal:

npm install @deox/blogger-feed

Usage

The module can be imported using import in ES Modules and require in Common JS as shown below:

ES Modules:

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

// ...

Common JS:

// index.cjs
const { BloggerFeed } = require("@deox/blogger-feed");

// ...

API

Some examples are:

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

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

(async () => {
  const blog = await feed.blog.get(); // type: Blog

  const posts = await feed.posts.list({ maxResults: 5 }); // type: Post[]

  const pages = await feed.pages.list(); // type: Post[]

  const comments = await feed.comments.list({ maxResults: 20 }); // type: Comment[]

  // ...
})();

There are more methods. You can explore it by installing the package!