0

I see a lot of useful methods in the API, but I don't find any method to list all my Posts, or all the posts from within a publication. Is this intentional?

Thought it would be something really obvious to exist in the API. Or am I missing something?

Antonio Brandao
  • 1,353
  • 13
  • 19
  • Does this answer your question? [How to retrieve Medium stories for a user from the API?](https://stackoverflow.com/questions/36097527/how-to-retrieve-medium-stories-for-a-user-from-the-api) – VLAZ Nov 28 '22 at 20:28

2 Answers2

0

Got it, just use the RSS feed instead.

Antonio Brandao
  • 1,353
  • 13
  • 19
0

I wrapped a Github package by @mark-fasel into a Clay microservice that enables you to do exactly this:

Simplified Return Format: https://clay.run/services/nicoslepicos/medium-get-users-posts-simple

What Medium actually returns at the endpoint https://clay.run/services/nicoslepicos/medium-get-users-posts

I put together a little fiddle, since a user was asking how to use the endpoint in HTML to get the titles for their last 3 points: https://jsfiddle.net/h405m3ma/1/

You can call the API as:

curl -i -H "Content-Type: application/json" -X POST -d '{"username":"nicolaerusan"}' https://clay.run/services/nicoslepicos/medium-get-users-posts-simple

You can also use it easily in your node code using the clay-client npm package and just write:

Clay.run('nicoslepicos/medium-get-users-posts-simple', {"username":"usernameValue"}) .then((result) => {

// Do what you want with returned result console.log(result);

})

If you need to generally pull down an RSS feed, here's a microservice for that: https://clay.run/services/nicoslepicos/rss-to-json

nicoslepicos
  • 505
  • 1
  • 5
  • 9