Hi
Thank you for the awesome API. I was able to fetch partial information using my user ID like name, profile, but not followers for instance.
I want to fetch and iterate over articles automatically to publish on my blog, which I can’t acheive by using get user publications. lists, or articles.
Here’s my Medium profile: https://medium.com/@sahaflores
Thanks in advance
Junte-se à discussão - adicione o comentário abaixo:
Hey Sasha,
Seems like you’re referring to 2 different User accounts:
For @sahaflores (d20db0e477e2), I was able to fetch 2 publications, 4 lists and 8 articles.
Can you please confirm your user account?
Nishu
PS:
Thank you Nish for the quick response. I have a user id (45d0a8e5ae7)
all return ZERO, only get article by id works for me!!! that left me with the only choice of iterating over artciles by its ids like below:
const articleIds = [
‘d4c046bb2a95’,
// ‘95d12cac7792’,
// ‘af818efc7a2e’,
// ‘ce35ab0a564d’,
// ‘a100e825ff8c’,
// ‘51cb4f656257’,
// ‘6da5ba68db69’,
];
I need to fetch all publication, list, or articles.
"SyncMe is a great option for a backend developer like myself I’m struggling with how to renter the reponse to my html file.
Hey Sasha, Thanks for taking an interest in Medium API.
To limit the size of the payload, we do not send everything from a single endpoint. You can get all the basic information about an user using “User Info” endpoint. But if you want to get their followers, there is another endpoint for that, called “User Followers”, which return the list of user_ids of user’s followers.
If you want to fetch all the articles from your User profile (in this case, username = sahaflores), you’ll need to first get your
user_id
from “User ID” endpoint. Use this to fetch all your article_ids from “User Articles” endpoint. Then loop over those article_ids and use any of the “Articles” endpoint such as “Article Info”, “Article HTML”, “Article Markdown”, “Article Content” to fetch the information you want.Resources:
If you know Javascript, check out this article: https://mediumapi.com/get-medium-users-article-using-javascript.html
If you’re a python developer, then I’ll highly recommend using our Python SDK (
pip install medium-api
) to simplify your task. (https://github.com/weeping-angel/medium-api)Also, watch our Tutorial Video for doing the same: https://www.youtube.com/watch?v=N6SyoFG-pno
And check out our blogs: https://mediumapi.com/blogs.html
PS: We have developed an specialized service to help people synchronise their Medium Articles with their portfolio website. It’s called “SyncMe”. (https://syncme.mediumapi.com). If you’re interested in this, please let me know.
Also, for any queries, doubts or suggestions, email me at nishu@mediumapi.com