How to order discussions by date using API V2?

Hi,

How can order I discussions by (inserted - updated) date in (ascending - descending) order using API V2?

Thanks!

Comments

  • It is not currently possible, the getWhereRecent method of the discussion model doen't influence the order.

    grep is your friend.

  • there is a BeforeGet event in the discussion model where order can be influenced, but this wouldn't be influenced by a call parameters.

    grep is your friend.

  • x00x00 MVP
    edited March 2019

    I suppose you could make plugin that detects call parameters on discussionsApiController_indexFilters_handler then process that value in discussionModel_beforeGet_handler setting the OrderBy event argument.

    grep is your friend.

  • this is all becuase getWhereRecent doen't actually consider order. it calls getWhere which does.

    grep is your friend.

Sign In or Register to comment.