Advanced Medium API is a JSON-based API. All requests are made to endpoints beginning (base URL
): https://advanced-medium-api.herokuapp.com/ .All requests must be secure, i.e. https
, not http
.
This API aims to retrieve the missing parts of Medium's Rss feed. All the requests are GET
Requests.
Users could be able to get 5 types of responses from this API.
end point: /medium/user/{userId}
Medium gives public access to get RSS feed for the last 10 medium posts. This end point gives the direct JSON conversion of that RSS Feed.
Key | Description |
---|---|
url |
URL of Medium profile |
title |
Title of your feed |
link |
Hyperlink to the feed profile |
author |
Empty string |
description |
Phrase or sentence describing the feed |
image |
Medium profile image |
Key | Description |
---|---|
title |
Title of the Medium post |
pubDate |
Published date of the Medium post |
link |
Hyperlink of the Medium post |
guid |
Hyperlink of the Medium post which contains Unique Id of the post |
author |
Medium display name of the user |
thumbnail |
Thumbnail of the Medium post |
description |
The medium post synopsis |
content |
The content of the Medium post |
enclosure |
Empty string |
categories |
Tags of the Medium post |
end point: /advanced/user/{userId}
This endpoint return the response which contains the above Medium feed in JSON and moreover it contains the missing part of the Medium feed such as clapCount
, voterCount
, responseCount
, readingTime
.
Key | Description |
---|---|
clapCount |
Number of Claps for the Medium post |
voterCount |
Number of voters clap for the Medium post |
responseCount |
Number of response for the post |
readingTime |
Reading Time for the Medium post |
end point: /customized/user/{userId}
This endpoint return the response which is the customized version of the JSON conversion of the Medium's RSS Feed. Order the Medium post's tags according to their use count among the latest 10 posts and the tagOrder
return that tags' order rank. Medium's latest 10 posts were divide by 3 and every 3 posts pushed in an array and those arrays pushed in one array.
Key | Description |
---|---|
author |
Medium display name of the user |
avatar |
Medium profile image |
content |
The content of the Medium post |
link |
Hyperlink of the Medium post which contains Unique Id of the post |
postImage |
Thumbnail of the Medium post |
profileLink |
Hyperlink to the Medium profile |
pubDate |
Published date of the Medium post |
tag |
Most suitable tag for the Medium post among other tags of a Medium post |
tagOrder |
tags' order rank |
title |
Title of the Medium post |
end point: /advanced/customized/user/{userId}
This endpoint return the response which contains the above customized Medium feed in JSON and moreover it contains the missing part of the Medium feed such as clapCount
, voterCount
, responseCount
, readingTime
.
end point: /medium/post/{postId}
User could able to get only the missing part (clapCount
, voterCount
, responseCount
, readingTime
) of Medium feed.
- express - A minimal and flexible Node.js web application framework
- cors - Allows users to relax the security applied to an API
- cheerio - Tool for parsing HTML and XML in Node. js
- Axios - Promise based HTTP client
- request - Simplest way possible to make http calls
To setup the app for development on your local machine, please follow the instructions below:
-
Clone the repo to your machine
git clone https://github.com/sabesansathananthan/advanced-medium-api.git cd advanced-medium-api
-
Install packages
npm install
-
Run the development server
node index.js
-
Visit http://localhost:9002
5. Live Demo
Don't forget to give a star ⭐ for this repo 🙂
This project is licensed under the MIT License - see the LICENSE file for details