API Call to get total sum of all users' balances

Add your suggestions for improving Poker Mavens

API Call to get total sum of all users' balances

Postby mantux5 » Wed Jul 15, 2015 12:10 pm

As written in the title, I would like Poker Mavens to have an API method to get the sum of all users' balances. This is implemented in the sever program(but not on Remote Admin) already. However, if I want to show this information to people without access to the machine where software is hosted, the only way to display it real-time is to get all user accounts and only then add them up. It uses up quite a lot resources on the webserver as there are over 60 000 users.
mantux5
 
Posts: 70
Joined: Fri Apr 03, 2015 1:33 pm

Re: API Call to get total sum of all users' balances

Postby Kent Briggs » Thu Jul 16, 2015 10:22 am

The server does not have a central chip account so it's just looping through all the selected account balances and calculating the sum. Don't remember why that isn't in the Remote Admin interface but I'll look at adding it there. I could possibly include the total in the SystemStats call in the API. In the mean time, you can minimize the load by calling AccountsList with the Fields parameter only set to "Balance" and use the JSON method to fetch that as a single array.
Kent Briggs - [email protected]
Briggs Softworks - http://www.briggsoft.com
Kent Briggs
Site Admin
 
Posts: 3829
Joined: Wed Mar 19, 2008 8:47 pm

Re: API Call to get total sum of all users' balances

Postby mantux5 » Thu Jul 16, 2015 12:35 pm

Ok. Thank you.
mantux5
 
Posts: 70
Joined: Fri Apr 03, 2015 1:33 pm

Re: API Call to get total sum of all users' balances

Postby Kent Briggs » Sat Aug 08, 2015 2:43 pm

A new SystemBalance command has been added to the API in version 4.42. See release notes:

http://www.briggsoft.com/forums/viewtopic.php?f=7&t=2014
Kent Briggs - [email protected]
Briggs Softworks - http://www.briggsoft.com
Kent Briggs
Site Admin
 
Posts: 3829
Joined: Wed Mar 19, 2008 8:47 pm


Return to Wish List

Who is online

Users browsing this forum: No registered users and 7 guests