1.0.4 • Published 11 months ago

getblogs v1.0.4

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

npm version install size npm downloads Known Vulnerabilities

Table of contents

Installation

Package manager

Using npm:

$ npm install getblogs

Using yarn:

$ yarn add getblogs

Using pnpm:

$ pnpm add getblogs

Using jsDelivr CDN (ES5 UMD browser module):

<script src="https://cdn.jsdelivr.net/npm/getblogs@1.0.4/dist/index.js"></script>

Using unpkg CDN:

<script src="https://unpkg.com/browse/getblogs@1.0.4/dist/index.js"></script>

Features

  • Multiple Social Media Support
  • Focus on high performance
  • Super-high test coverage
  • Executable for generating applications quickly

Usage

Once the package is installed, you can import the library using import or require approach:

import getblogs, { devto, medium, hashnode } from "getblogs";

You can also use the default export, since the named export is just a re-export from the getblogs factory:

import getblogs from "getblogs";

getblogs.devto.getBlogPosts("username").then((data) => console.log(data));

If you use require for importing, only default export is available:

const getblogs = require("getblogs");

getblogs.devto.getBlogPosts("username").then((data) => console.log(data));

destructuring with require:

const { devto, medium, hashnode } = require("getblogs");

devto.getBlogPosts("username").then((data) => console.log(data));

Dev.to

Currently, We have only fetching blogs feature.

getBlogPosts(username)
devto
    .getBlogPosts("your_username")
    .then((data) => {
        console.log(data);
    })
    .catch((err) => console.error(err));

Medium

Currently, We have only fetching blogs feature.

getBlogPosts(username)
medium
    .getBlogPosts("@your_username")
    .then((data) => {
        console.log(data);
    })
    .catch((err) => console.error(err));

NOTE: Make sure you add @ before your username for medium.

HashNode

Currently, We have only fetching blogs feature.

getBlogPosts(username, page: number, limit:number)
let page = 2; // Default 1
let limit = 10; // Default 5

hashnode
    .getBlogPosts("your_username", page, limit)
    .then((data) => {
        console.log(data);
    })
    .catch((err) => console.error(err));

Contributing

See the Contributing Guide for more technical details on contributing.

License

MIT

1.0.4

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago