Socket
Socket
Sign inDemoInstall

article-api

Package Overview
Dependencies
3
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    article-api

Api client for dev.to and medium to fetch recent articles


Version published
Weekly downloads
0
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Article-api

Api client for dev.to and medium to fetch recent articles



Get recent articles from dev.to and medium by just providing your username and showcase them on your portfolio or blog site.

PHP version: Article-api

Installation

Install via NPM

npm install article-api

Install via Yarn

yarn add article-api

Usage

  • getDevtoArticle(): Get 10 recent articles from dev.to

    const { getDevtoArticle } = require("article-api");
    
    getDevtoArticle({
        user: 'yourusername'
    }).then(res => {
        console.log(res);
    })
    
  • getMediumArticle(): Get 10 recent articles from medium

    const { getMediumArticle } = require("article-api");
    
    getMediumArticle({
        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, clone this repo locally and commit your code on a new branch. Feel free to create an issue or make a pull request.

Thank You

Stargazers repo roster for @arifszn/article-api

Support

Show your ❤️ and support by giving a ⭐.

License

Article-api is open source software licensed under the MIT.

Keywords

FAQs

Last updated on 01 Jan 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc