API and HTML Examples

For discussion of the Poker Mavens server module and other administration topics
Post Reply
Kent Briggs
Site Admin
Posts: 5620
Joined: Wed Mar 19, 2008 8:47 pm

Re: API and HTML Examples

Post by Kent Briggs »

Alex wrote:Command=TournamentsResults&Date=2009-03-12&Name=Tournament #02

sorry for bugging you...but what's wrong with these parameters?
Encode that "#" symbol to %23. It's a reserved character in HTML.
Kent Briggs - [email protected]
Briggs Softworks - http://www.briggsoft.com
Alex
Posts: 53
Joined: Sun Mar 08, 2009 10:08 pm

Re: API and HTML Examples

Post by Alex »

Kent Briggs wrote:
Alex wrote:How about one where you can save tournament results to a mysql database?
Use the TournamentsResults API for that. You'll have to parse the output to get it in the format you need for your own database.
Do you have any examples?
Kent Briggs
Site Admin
Posts: 5620
Joined: Wed Mar 19, 2008 8:47 pm

Re: API and HTML Examples

Post by Kent Briggs »

Alex wrote:Do you have any examples?
Just the one for fetching and displaying the raw results file:

http://www.briggsoft.com/docs/pmavens/A ... ey_results
Kent Briggs - [email protected]
Briggs Softworks - http://www.briggsoft.com
Alex
Posts: 53
Joined: Sun Mar 08, 2009 10:08 pm

Re: API and HTML Examples

Post by Alex »

Maybe add something in here for users adding custom avatars on a web page and it updating the game client? :D

May be helpful to some people.
Kent Briggs
Site Admin
Posts: 5620
Joined: Wed Mar 19, 2008 8:47 pm

Re: API and HTML Examples

Post by Kent Briggs »

Alex wrote:Maybe add something in here for users adding custom avatars on a web page and it updating the game client? :D

May be helpful to some people.
There's lots of PHP examples out there for uploading files. But you'll need some human approval process in the mix to not only check for obscene images, but to enforce the specific 48x48 GIF/PNG/SWF format. Plus most people won't have the ability to create one with a transparent background so it fits nicely on a round seat.
Kent Briggs - [email protected]
Briggs Softworks - http://www.briggsoft.com
Alex
Posts: 53
Joined: Sun Mar 08, 2009 10:08 pm

Re: API and HTML Examples

Post by Alex »

I almost have the hand history working...but I'm having trouble with the url...

what is the name parameter?
Kent Briggs
Site Admin
Posts: 5620
Joined: Wed Mar 19, 2008 8:47 pm

Re: API and HTML Examples

Post by Kent Briggs »

Alex wrote:I almost have the hand history working...but I'm having trouble with the url...
what is the name parameter?
The name of the table. Help docs posted below. Don't forget to URLEncode() that if it has # symbols or other reserved html characters in the name.

Code: Select all

LogsHandHistory - call without any parameters to retrieve a list of dates and table names where a hand history file was created. Example output will look something like this:

Result=Ok
Files=2
Date1=2009-03-01
Name1=Ring Game #1
Date2=2009-03-05
Name2=Tournament #3 - Table 1

Call with a Date parameter in the format of yyyy-mm-dd and a Name parameter to retrieve the contents of a hand history file. Example output will look something like this:

Result=Ok
Hand #3859-1 - 2009-02-18 18:31:12
Game: No Limit Hold'em (500 - 2000) - Blinds 10/20
Site: Briggs Softworks
Table: Ring Game #1
Seat 4: pm2 (2000)
Seat 9: pm1 (1180)
pm2 has the dealer button
pm2 posts small blind 10
pm1 posts big blind 20
** Hole Cards **
pm2 folds
pm1 refunded 10
pm1 wins Pot (20)
Kent Briggs - [email protected]
Briggs Softworks - http://www.briggsoft.com
Alex
Posts: 53
Joined: Sun Mar 08, 2009 10:08 pm

Re: API and HTML Examples

Post by Alex »

What if I want all tables?
Kent Briggs
Site Admin
Posts: 5620
Joined: Wed Mar 19, 2008 8:47 pm

Re: API and HTML Examples

Post by Kent Briggs »

Alex wrote:What if I want all tables?
Call LogsHandHistory without any parameters to get a list of all files available. Then run a loop and fetch those individually.
Kent Briggs - [email protected]
Briggs Softworks - http://www.briggsoft.com
monsterix
Posts: 9
Joined: Sun Jul 12, 2009 5:45 pm
Location: Switzerland
Contact:

Re: API and HTML Examples

Post by monsterix »

rjones33 wrote:
lp69 wrote:How do you do that ? I thought it wasn't possible, I didn't figure out how to have the poker server retrieve the data from the SQL database.
Kent is correct. It is really very simple. The way I have my workflow setup, everything runs through the website. For example, when a user goes to my site and creates a user account, I create the the account via the api and also write the information to a table in a SQL database. I also use this data as the user's membership data to access the website so everything stays in sync and one set of credentials get the user into everthing: website, forums, poker server, etc. Go by the site and check it out at http://www.pokersharkz.net
Hi,

I have visited your site and have some questions about. Could you please contact me here: [email protected]

I wanted to send you a private message on the forum but there is no option or I haven't seen it.

my best regards.
ManiakPoker.com: An other poker experience :)

http://www.maniakpoker.com
Post Reply