'Consuming Medium API - JSON

I have a little problem .. I need to get the data from the Medium API and display it in my Digital Portfolio. But I'm having trouble taking this JSON and displaying it in my components. Could you suggest to me how to solve this?

JSON Example:
https://api.rss2json.com/v1/api.json?rss_url=https://medium.com/feed/@mikaeriohana

NOTE:
My intention is to take the JSON data (title, link and image) and display it in a carousel.



Solution 1:[1]

I've made my own version of Medium API, to quickly and efficiently retrieve data from https://medium.com. Using just 3 endpoints, you can get all the articles written by you.

Base URL: https://medium2.p.rapidapi.com

Step-1. GET /user/id_for/{username}

This endpoint will return your user_id (unique hash assigned to every medium user).

Example, my username is nishu-jain, so when I'll hit this endpoint, I'll get

{
 "id": "1985b61817c3"
}

Step-2. GET /user/{user_id}/articles

This will return a list of article_ids which we can use to retrieve information related to each article.

{
 "associated_articles": [
    "*hash_id_of_article_1*",
    "*hash_id_of_article_2*",
    "*hash_id_of_article_3*",
    .
    .
    .
]
}

Step-3 GET /article/{article_id}

This endpoint will return information related to article, such as title, subtitle, claps, voters, tags, topics, author (user_id), published date, etc…

{
  "id": "*article_id*",
  "title": "*article_title*",
  "subtitle": "*article_subtitle*",
  "claps": "*claps_count*",
  "voters": "*voters_count*",
  "published_at": "YYYY-MM-DD hh:mm:ss",
  "image_url": "https://miro.medium.com/*image_hash*.png"
  .
  .
  .
}

For testing the APIs: https://rapidapi.com/nishujain199719-vgIfuFHZxVZ/api/medium2/

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1