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!
0
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.
I suppose you could make plugin that detects call parameters on
discussionsApiController_indexFilters_handler
then process that value indiscussionModel_beforeGet_handler
setting theOrderBy
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.