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

  • x00x00 MVP

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

    grep is your friend.

  • x00x00 MVP

    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 7

    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.

  • x00x00 MVP

    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.