Git Product home page Git Product logo

blog.js's Introduction

blog.js is a JavaScript client designed to fetch recent blog posts from popular blogging platforms such as Dev, CRYPTO HUB and Medium. By providing a username, users can easily retrieve and showcase their most recent posts on their website or portfolio.

Installation

Install via NPM.

npm install rastislavcore/blog.js#main

Or install via Yarn.

yarn add rastislavcore/blog.js#main

Usage

  • getDevPost(): Get 10 recent posts from dev.

    const { getDevPost } = require('blog.js');
    
    getDevPost({
      user: 'yourusername',
    }).then((res) => {
      console.log(res);
    });
  • getCryptohubPost(): Get 10 recent posts from CRYPTO HUB.

    const { getCryptohubPost } = require('blog.js');
    
    getCryptohubPost({
      user: 'yourusername',
    }).then((res) => {
      console.log(res);
    });
  • getMediumPost(): Get 10 recent posts from medium.

    const { getMediumPost } = require('blog.js');
    
    getMediumPost({
      user: 'yourusername',
    }).then((res) => {
      console.log(res);
    });

Sample Response

[
    {
        title: "Why Enhancing Virtual Reality is Important",
        description: "Virtual reality is seen as a “fun” technology to some without much...",
        thumbnail: "https://cdn-images-1.medium.com/max/2600/0*kz30LOdXT8CyOymh",
        link: "https://medium.com/p/ac19dd21c728",
        categories: ["vr", "technology", "virtual-reality", "engineering", "artificial-intelligence"],
        publishedAt: Wed Aug 11 2021 18:43:34 GMT+0600
    },
    {
        title: "How to Get Started With Data Science: a Brief Guide",
        description: "You’ve heard about data science and machine learning, and you want to get started. Maybe you hear...",
        thumbnail: "https://cdn-images-1.medium.com/max/2600/0*Ah0vLtsvxqUvRWuS",
        link: "https://medium.com/p/88ec244f2fee",
        categories: ["beginner-coding", "data-science-training", "machine-learning-course"],
        publishedAt: Mon Jul 26 2021 22:55:26 GMT+0600
    }
]

Contribute

To contribute, see the contributing guide.

License

MIT License

blog.js's People

Contributors

arifszn avatar dependabot[bot] avatar rastislavcore avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.