JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6
  • Score
    100M100P100Q21325F
  • License ISC

get blogs from social media platforms

Package Exports

  • getblogs
  • getblogs/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (getblogs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

GetBlogs

Get blog posts from social media by username without authentication

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