Skip to content

Instantly share code, notes, and snippets.

@weeping-angel
Last active March 4, 2024 13:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save weeping-angel/9029e637155ebc4038ecc3930af93913 to your computer and use it in GitHub Desktop.
Save weeping-angel/9029e637155ebc4038ecc3930af93913 to your computer and use it in GitHub Desktop.
[Get User's Articles] Code to get all the articles written by a Medium User. #python #medium_api #medium_api_py
# Import libraries
import os
from medium_api import Medium
# Get RAPIDAPI_KEY from the environment
api_key = os.getenv('RAPIDAPI_KEY')
# Create a `Medium` Object
medium = Medium(api_key)
# Create an "User" Object using 'username'
user = medium.user(username="nishu-jain")
# Fetch user-written articles
user.fetch_articles()
# Iterate over user articles and print their title
for article in user.articles:
print(article.title)
# Import libraries
import os
from medium_api import Medium
# Get RAPIDAPI_KEY from the environment
api_key = os.getenv('RAPIDAPI_KEY')
# Create a `Medium` Object
medium = Medium(api_key)
# Create an "User" Object using 'username'
user = medium.user(username="nishu-jain")
# Fetch user-written articles
user.fetch_articles()
# Iterate over user articles and print their title
for article in user.articles:
print(article.title)
About Me :) — Nishu Jain
Medium API — Documentation
Added Two New Articles-Related Endpoints!
10 Meaningful Ways to Spend Your Evenings Instead of Mindless Scrolling!
Why APIs are the Game-Changers of the Startup World 👾
Work/Life Balance Is For Losers
Medium API — Frequently Asked Question (FAQs)
Medium API and Tokenblogs Join Forces To Revolutionize The NFT Space! 🤝
How “Memes & Funny Videos” are Shaping Our Friendships?
Authenticate Medium Users Using Medium API
9 Surprising Signs of Emotional Maturity in the Workplace
Teacher Forcing — Summary
Medium Notification Service
How To Get Articles Written By a Medium User Using JavaScript
How To Convert Medium Articles In Markdown Format
.
.
.
Luck, Quantum entanglement and Psychology
You’ll Never Be A Great Writer [Not Your Average Article]
4 Tips to Strengthen Your Bonds — Now
My Dear Doppelganger …
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment