New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

medium-article-api

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

medium-article-api

NPM package for using medium articles api

latest
Source
npmnpm
Version
1.0.4
Version published
Weekly downloads
8
33.33%
Maintainers
2
Weekly downloads
 
Created
Source

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

FunctionArgumentsOutput
getDatausername: stringstring
getProfileUrlusername: stringstring
getProfileTitleusername: stringstring
getProfileAuthorusername: stringstring
getProfileDescriptionusername: stringstring
getProfileImageUrlusername: stringstring
getLatestArticleTitleusername: stringarray[string]
getLatestArticlePublicationDateusername: stringstring
getLatestArticleUrlusername: stringstring
getLatestArticleDescriptionusername: stringhtml
getLatestArticleusername: stringobject
getLatestArticlesTitleusername: stringstring

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.

Keywords

medium-articles

FAQs

Package last updated on 29 May 2024

Did you know?

Socket

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