Forum Discussion

Laurent's avatar
Laurent
Contributor
13 years ago

Returning threads that have the most recent replies

Hi,

 

For a solution I'm currently working on, I'd like to get the following response from my forum by Lithium:

- Returning the two Forum threads with the most recent posts within a specific Forum category.

- For each of these threads, the subject (of the original post) is displayed, as well as the date/time and author of the most recent post in this thread.

- The subject is clickable and therefore the specific location of the threads must also be returned.

 

Do I need several calls to retrieve the information above or is there a single call available for this purpose? Thanks in advance for your reply!

 

Regards,

Laurent

  • Hello Laurent,

     

    As far as I know you can use REST API for achieveing your goal.

    For example you can use the following request: 

     

    http://%Your Community Name%.stage.lithium.com/restapi/vc/categories/id/%Category Name%/search/messages?page=1&page_size=2&q=is_root:true&restapi.format_detail=full_list_element&sort_by=-topicPostDate

     

    It should return 2 recent topics in the specified category