sorting on get_chat_groups.json (order)

14 views
Skip to first unread message

Pratik Patel

unread,
Apr 11, 2012, 11:07:10 AM4/11/12
to cocoafi...@googlegroups.com
I'm trying to get a list of chat groups in sorted order to know when a new chat has been sent, and also to show all chat groups in sorted order to the user.
It seems as if the get_chat_groups.json call does not do any sorting when using the 'order' param.

exports.doAPICall({

"method" : "GET",

"call" : "https://api.cocoafish.com/v1/chats/get_chat_groups.json",

"params" : {

"per_page" : 10,

"response_json_depth" : 1,

'order': 'updated_at'


-----------------------------------------------------------
CTO, TripLingo (http://www.triplingo.com)
Twitter: prpatel
Skype: prpatel

Pratik Patel

unread,
Apr 16, 2012, 7:31:22 PM4/16/12
to cocoafi...@googlegroups.com
I have a app that needs to be shipped tonite and this issue is blocking us from releasing! Please help.

-----------------------------------------------------------
CTO, TripLingo (http://www.triplingo.com)
Twitter: prpatel
Skype: prpatel

Wei Kong

unread,
Apr 16, 2012, 7:35:03 PM4/16/12
to cocoafi...@googlegroups.com
Hi Srroy about that. let me take a look

___________________
Wei Kong
Co-Founder | Cocoafish
mobile: 415-533-1853

Wei Kong

unread,
Apr 16, 2012, 7:52:58 PM4/16/12
to Cocoafish Users
Hi This is actually working as expected, chat group is created when
the first message was sent. Maybe you can try to sort by updated_at
instead, whenever a chat is added to a chat_group, the updated_at is
updated for that chat group.

Pratik Patel

unread,
Apr 16, 2012, 7:55:29 PM4/16/12
to cocoafi...@googlegroups.com
Wei,
yes, the updated_at is set properly, but the sorting (order flag) is not working. Here's the query I'm sending:
exports.doAPICall({
"method" : "GET",
"params" : {
"per_page" : 10,
"response_json_depth" : 1,
'order': 'updated_at'

-----------------------------------------------------------
CTO, TripLingo (http://www.triplingo.com)
Twitter: prpatel
Skype: prpatel

Wei Kong

unread,
Apr 16, 2012, 8:11:38 PM4/16/12
to Cocoafish Users
I see, can you please try again? It was a bug and we add a patch

mellomike

unread,
May 5, 2012, 4:47:34 PM5/5/12
to Cocoafish Users
Sorting still doesn't seem to be working .... I'm trying to query my
reviews and using {'order':'updated_at'} ... nothing is being sorted
event if I switch the flag to -updated_at
Reply all
Reply to author
Forward
0 new messages