Categories_and_latest json and subcategory_ids

Hi,

I am building a Mac app that will show a notification of any new post in Discourse Forums.

It show the latest posts, with subject, user etc. And will open the post in the Macs browser when clicked.

I am using requests for the forums json files to parse this data.

All is working ok but I want to include the category in the displayed info, I found the categories_and_latest json file but cannot find the subcategory_ids list json file which the main topic may refer to in category_id ?

i.e finding category_id":67. name is fine

"categories": [
            {
                "id": 67,
                "name": "announcements"

but "category_id":56,. for example appears to be a sub category of one of the main categories for which I cannot find a listing to match 56’s name

Can anyone point me in the right direction of the json url please.

Many thanks

1 Like

You can use /categories.json?include_subcategories=true.

4 Likes

Brilliant thank you, I will look at that, hopefully I can get what I am after.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.