Is there a way that I can pull the title from latest topics from discourse to my app?

i want to pass data, for example: titles of the latest questions from forum.example.com to example.com is this possible?

i want to have a section on example.com that says:

Latest Questions and then a list of those questions links to those questions.

Yes, just use ajax and call forum.example.com/latest.json and then iterate over the data and load it into your site.

In all actuallity, you don’t have to do it client side either, you simply just have to process that json endpoint.

3 Likes

Why not use the existing RSS feeds for this?

is there a way to limit the amount of data from /latest.json ? I only want to see the 10 most recent topics?

I don’t have a clue how to utilize the rss feed. i will have to search for that a bit.

https://github.com/discourse/discourse/blob/33d0a23d84a4d22f28b33a44df67dee1d14c35a0/lib/topic_query.rb

I can’t get any of these two work for me, for example, I only want to see the 5 latest topics:

https://meta.discourse.org/latest.json?limit=5

it does not work? thanks.