Medium

FREEMIUM
Verified
От Nishu Jain | Обновлено un mese fa | Data
Популярность

9.7 / 10

Задержка

621ms

Уровень обслуживания

100%

Health Check

N/A

Назад ко всем обсуждениям

Can't fetch my articles, publications, & lists

Rapid account: Sasha Flores
SashaFlores
9 mesi fa

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

Rapid account: Nishujain 199719 Vg Ifu FH Zx VZ
nishujain199719-vgIfuFHZxVZ Commented 9 mesi fa

Hey Sasha,

Seems like you’re referring to 2 different User accounts:

  • @sahaflores with user_id = d20db0e477e2 (contains some articles)
  • @sashaflores with user_id = 45d0a8e5ae7 (no articles are published)

For @sahaflores (d20db0e477e2), I was able to fetch 2 publications, 4 lists and 8 articles.

Can you please confirm your user account?

Nishu

PS:

  • For Getting Started with SyncMe, email nishu@mediumapi.com.
  • Also, for avoiding excessive overage, please subscribe to a higher plan (PRO or above).
Rapid account: Sasha Flores
SashaFlores Commented 9 mesi fa

Thank you Nish for the quick response. I have a user id (45d0a8e5ae7)

  1. get user publication
  2. get user list
  3. get articles by user

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.

Rapid account: Nishujain 199719 Vg Ifu FH Zx VZ
nishujain199719-vgIfuFHZxVZ Commented 9 mesi fa

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

Присоединяйтесь к обсуждению – добавьте комментарий ниже:

Войдите / Зарегистрируйтесь, чтобы публиковать новые комментарии