Page 1 of 1

Retrieve List of Tables in Order

Posted: Wed Nov 14, 2018 1:23 am
by Dornica
Hi Kent,
I was wondering if it's possible to get the list of rings sorted by the number of seated players (or any other parameter) from the API.
If not, how do you recommend doing so?
Shall I make my own table in the database of my website and whenever a player sits or gets up I send a callback and update the # of seated players in my DB and get the list of rings from there for showing purposes?

Re: Retrieve List of Tables in Order

Posted: Wed Nov 14, 2018 10:42 am
by Kent Briggs
Just call RingGamesList in the API and include Status in the Fields parameter, which will give you the player count. Sort the list yourself by the order you want. If you need additional details on players, loop through the table list returned by RingGamesList and call RingGamesPlaying for each one.

Re: Retrieve List of Tables in Order

Posted: Wed Nov 14, 2018 10:45 am
by Kent Briggs
Dornica wrote:Shall I make my own table in the database of my website and whenever a player sits or gets up I send a callback and update the # of seated players in my DB and get the list of rings from there for showing purposes?
You could certainly do it that way also, especially if you need the real-time updates.