|
Project Information
Members
Featured
Downloads
Wiki pages
Links
|
Maniaplanet Web ServicesThe Maniaplanet Web Services is the public API that everyone can use to retrieve various information about the game, the players, the rankings, etc. You can use that API to build all sorts of applications. This project is an open-source PHP SDK for easy integration in your applications. It is developed and supported by Ubisoft Nadeo. <?php
require_once '/path/to/autoload.php';
$players = new \Maniaplanet\WebServices\Players('your_api_username', 'your_api_password');
var_dump($players->get('gouxim'));
?>
ManiaConnectManiaConnect is a unified authentication system and a set of Web Services that lets your application authenticate players with their Maniaplanet account and retrieve various protected information. The great thing is that it works both on Manialinks and on Websites. With the open-source PHP SDK, integration is very easy. It relies on the OAuth 2.0 protocol. <?php
require_once '/path/to/libraries/autoload.php';
$maniaconnect = new \Maniaplanet\WebServices\ManiaConnect\Player('your_api_username', 'your_api_password');
$player = $maniaconnect->getPlayer();
// If the player is connected
if($player)
{
$buddies = $maniaconnect->getBuddies();
var_dump($player, $buddies);
}
// If the player is not connected
else
{
$loginURL = $maniaconnect->getLoginURL('basic buddies');
echo '<a href="'.$loginURL.'">Login with your Maniaplanet account</a>';
}
?>
|