API

From FreePokerAlliance wiki

Jump to: navigation, search

The article contains extended documentation about the Free Poker Alliance API. With the API, you can add several functions to your application (like registration, forgotten password) as well as retreive statistics (like top ranking players).

Contents

HTTP Interface

The FPA API uses a REST-like protocol, which means that our FPA method calls are made over the internet by sending HTTP GET or POST requests to the FPA API Services. Nearly any computer language can be used to communicate over HTTP with the services.

Currently the system has the following modules: Administrative, Statistics, Mobile.

Security

The FPA API is open for anyone. That's an advantage usability-wise, but a great disadvantage security-wise. There are a lot of methods in the API, where proper authorization is necessary, and without verifying the identity of the requester, anyone could call sensitive methods in the system. To prevent this, we integrated the widely-used OAuth framework into our administrative services, and (of course) request signing support into our client libraries. In the API documentation below, methods marked with the Image:Lock.png icon require authorization. Please refer to the examples in the Client libraries distributions, to see how signed requests can be executed.

The Administrative Service

Administrative requests are served by the Administrative Service.

The response of this service is a UTF-8 encoded pipe-separated text, describing all parameters and their values. All methods have a required “Command” parameter which contains the name of the method to be executed. All responses begin with a “Response” parameter which contains the result of the command. The responses also contain the indication of any errors that might have happened.

The Statistics Service

Statistic requests are served by the Statistics Service.

The Statistic API Method names and parameters are case-sensitive. See examples in the Statistic API Methods. The response is a UTF-8 encoded XML describing all parameters and their values. Please note that HTTP GZip compression is enabled here by default to reduce bandwidth, so please try to use it if you transfer large data assets frequently from our service.

The Mobile Service

Mobile requests are served by the Mobile Service. (Please note the mobile subdomain in the URI.)

Administrative API Methods

Registration
Registers a new player into the FPA system.
ProfileUpdate
Updates password or any profile data.
GetProfile
Returns a wide array of user-specific information.
PublicProfile
Returns a wide array of user-specific public information.
ForgotPassword
Method for dealing with forgotten passwords.
GetBalance
Returns the player's balance.
Image:lock.png FunBalanceAddX
Adds indicated amount to the player's balance.
GetAffiliateHighScore
Returns the overall high-score of all players.
Image:lock.png PlayerBan
Disables or re-enables the player's account.
PlayersOnline
Returns the number of online players.
GetPlayerRank
Returns the current rank of the requested player.

Statistic API Methods

GetWinners
Returns list of winners of given type.
GetEvaluations
Returns list of your evaluations.

Mobile API Methods

GetManufacturers
Returns list of available mobile manufacturers.
GetModels
Returns list of available mobile models based on the selected client and manufacturer.
GetLocales
Returns list of available localizations (languages) of the specified game.
GetGames
Returns list of available games based on the selected client, manufacturer and model.
SendSMSdownload * Note this is actually an administrative method
Sends the download URI of the game to the user's mobile phone.

External links

Partner statistics page

You can access your Partner Statistics Page to keep track of the number of registered users and the number of hands layed in a monthly breakdown.

Use your registered login name and password to access the site.

Personal tools