Fixed REST API - Unable to sort posts in thread by votes in Q&A threads

Jake B.

Well-known member
Affected version
2.2.3 Patch 1
As the title says, there is no way to replicate this functionality through the REST API currently
 
The API now allows the following
PHP:
/**
 * @api-desc Gets information about the specified thread.
 *
 * @api-in bool $with_posts If specified, the response will include a page of posts.
 * @api-in int $page The page of posts to include
 * @api-in string $order Request a particular sort order for posts from the available options for the thread type
 * @api-in bool $with_first_post If specified, the response will contain the first post in the thread.
 * @api-in bool $with_last_post If specified, the response will contain the last post in the thread.
 * @api-in bool $with_last_poster If specified, the response will contain the user record for the last poster.
 *
 * @api-out Thread $thread
 * @api-out Post $first_unread <cond> If the thread is unread, information about the first unread post
 * @api-out Post $first_post <cond> If requested, information about the first post in the thread
 * @api-out Post $last_post <cond> If requested, information about the last post in the thread
 * @api-out User $last_poster <cond> If requested, information about the author of the last post in the thread
 * @api-see self::getPostsInThreadPaginated()
 */
This means that you can now request order=vote_score for question-type threads, and also fetch the first post, last post and last poster independently.
 

Similar threads

Top Bottom