Skip to content

Instantly share code, notes, and snippets.

View weeping-angel's full-sized avatar
💭
Autodidact

Sanskar Jain weeping-angel

💭
Autodidact
View GitHub Profile
@weeping-angel
weeping-angel / get_recommended_feed.py
Created March 4, 2024 13:27
[Get Recommended Feed] Code to get Recommended Feed Articles from Medium. #python #medium_api #medium_api_py
@weeping-angel
weeping-angel / recommended_feed.sh
Last active March 4, 2024 13:29
[Recommended Feed] Shell command to retrieve the list of recommended articles for the given "tag". #shell #medium_api #medium_api_curl
@weeping-angel
weeping-angel / get_user_publication_following.py
Last active March 4, 2024 13:27
[Get User's Publication Following] Code to get publications that the given user is following. #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)
@weeping-angel
weeping-angel / get_article_assets.py
Last active March 4, 2024 13:26
[Get Article's Assets] Code to get assets present in the Medium Article such as images, videos, embeds, etc ... #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)
@weeping-angel
weeping-angel / get_recommended_articles.py
Last active March 4, 2024 13:26
[Get Recommended Articles] Code to get a list of recommended articles for the given Medium Article #python #medium_api #medium_api_py
@weeping-angel
weeping-angel / article_assets.sh
Last active March 4, 2024 13:29
[Article Assets] Shell command to retrieve assets present in a Medium Article #shell #medium_api #medium_api_curl
curl --header "x-rapidapi-key: $RAPIDAPI_KEY" \
"https://medium2.p.rapidapi.com/article/b7d838c84f72/assets"
@weeping-angel
weeping-angel / recommended_articles.sh
Last active March 4, 2024 13:28
[Recommended Articles] Shell command to retrieve recommended Medium Articles with respect to the given Article #shell #medium_api #medium_api_curl
@weeping-angel
weeping-angel / user_publication_following.sh
Last active March 4, 2024 13:29
[User Publication Following] Shell command to retrieve publications that the give user is following #shell #medium_api #medium_api_curl
curl --header "x-rapidapi-key: $RAPIDAPI_KEY" \
"https://medium2.p.rapidapi.com/user/1985b61817c3/publication_following"
@weeping-angel
weeping-angel / get_article_html.py
Last active March 4, 2024 13:27
[Get Article HTML] Code to get Medium Article in plain HTML format. #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)
@weeping-angel
weeping-angel / article_html.sh
Last active March 4, 2024 13:29
[Article's HTML] Shell command to retrieve article in plain HTML format. #shell #medium_api #medium_api_curl
curl --header "x-rapidapi-key: $RAPIDAPI_KEY" \
"https://medium2.p.rapidapi.com/article/d9b04a431d7e/html?fullpage=true&style_file=https://mediumapi.com/styles/dark.css"