Skip to content

A npm package designed to fetch user details and articles from Medium. This package provides a simple and efficient way to easily integrate Medium content into their applications.

License

Notifications You must be signed in to change notification settings

muhammad-usman-108/medium-article-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Medium Article APIs

npm version created by star size npm downloads license

A npm package designed to fetch user details and articles from Medium. This package provides a simple and efficient way to easily integrate Medium content into their applications.

Table of Contents

Installation

You can install this package using npm or yarn.

npm

npm i medium-article-api

yarn

yarn add medium-article-api

Usage

Here is a simple example to get you started:

import { MediumArticles } from 'medium-article-api';

const mediumArticles = MediumArticles();
const username = '<your-medium-username>';

mediumArticles.getProfileUrl(username).then( (result) => console.log('The profile url is ', result)); 
// https://medium.com/feed/@engrmuhammadusman108}

Functions

Function Arguments Output
getData username: string string
getProfileUrl username: string string
getProfileTitle username: string string
getProfileAuthor username: string string
getProfileDescription username: string string
getProfileImageUrl username: string string
getLatestArticleTitle username: string array[string]
getLatestArticlePublicationDate username: string string
getLatestArticleUrl username: string string
getLatestArticleDescription username: string html
getLatestArticle username: string object
getLatestArticlesTitle username: string string

Scripts

Build

To compile the TypeScript files to JavaScript, run:

npm run build

Test

To run tests, use:

npm run test

Configuration

TypeScript Configuration

This package uses a tsconfig.json file for TypeScript configuration. Here is an example:

{
  "compilerOptions": {
    "target": "ES6",
    "module": "commonjs",
    "strict": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "forceConsistentCasingInFileNames": true,
    "outDir": "./dist"
  },
}

Contributing

Support

engrmuhammk



LICENSE

This project is licensed under the MIT License - see the LICENSE file for details.

About

A npm package designed to fetch user details and articles from Medium. This package provides a simple and efficient way to easily integrate Medium content into their applications.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published