Using REST API to build a customized featured topic widget
Hi All,
I would like to build a customized featured topic widget which will just pull the ehtire categories but not pull the featured blog posts.
I am reading the article in here: http://lithosphere.lithium.com/t5/support-knowledge-base/Using-the-Featured-Topics-feature/ta-p/50772
However, the rest CALL return nothing http://forum.kpn.com/restapi/vc/threads/style/board/featured when i tried to use that.
If i give the category ID, it will return the threads which has been featured.
http://forum.kpn.com/restapi/vc/categories/id/KPN_Internet_Bellen_ITV/threads/featured/?page_size=3
can you please point out what I have done wrong?
Thank you.
Cheers,
Qing
Hi Qing,
There are a couple of reasons you're not getting any results. First, the interaction style key you want to use is "forum" instead of "board". Second, the call you're using will only return results from boards directly under the community level, rather than boards in categories. See this note in the documentation for that method:
"At category or wider scopes, only threads in directly nested boards are included, not those in boards in nested categories."
To get the featured threads for nested categories too, you should use the following method:
threads/style/[style] /featured/nested
For example:
http://forum.kpn.com/restapi/vc/threads/style/forum/featured/nested
I hope this helps!