blogger-js
v1.0.0
Published
Javascript client library for blogger CMS
Downloads
12
Maintainers
Readme
Blogger JS
This module is not complete. Feel free to send pull request
Blogger JS is a javascript client library for blogger CMS. You can get posts,pages and more from your blogger site by this module.
Install
with npm
installed, run
npm install blogger-js --save
or with yarn
installed, run
yarn add blogger-js
Initialization
Now import and initialize this library from your project
import bloggerJs from "blogger-js";
const blogger = new bloggerJs(API_KEY, BLOGGER_ID);
getBlog
Now, for getting blog informaation, use getBlog
method,
const blog = await blogger.getBlog();
getBlogById
You can get blog information with website url using getBlogByUrl
method
const blog = await blogger.getBlogByUrl("htttps://example.blogspot.com/");
getPostList
For getting all the post list, use getPostList
method
const posts = await blogger.getPostList();
getPostById
For getting a single post by it's id, try the getPostById
method
const post = await blogger.getPostById(POST_ID);
searchPost
For searching a post with query string, use the searchPost
method with the query string as argument
const result = await blogger.searchPost(QUERY_STRING);
getPostByPath
const result = await blogger.getPostByPath(POST_PATH);
getPageList
const result = await blogger.getPageList();
getPageById
const result = await blogger.getPageById(PAGE_ID);
MIT