SnowTigerLib -- PHP Freelancer API Wrapper class

SnowTigerLib is a wrapper class around the Freelancer API.

SnowTigerLib requires PHP 5.2 and the lib_curl module to be compiled into your PHP build. It also performs best when safe_mode is turned off.

The library can be downloaded here.

Examples.

Documentation.

And of course, please report any bugs or issues you might come across.

Installation
To use SnowTigerLib,First you need change the configuration in file "SnowTigerLib_Config.inc.php".
There are three configuration items you must change:

 
	//Your Consumer Token
	$apiConfig['ConsumerToken'] = 'Your Consumer Token';
	//Your Consumer Secret
	$apiConfig['ConsumerSecret'] = 'Your Consumer Secret';
	//Callback url
	$apiConfig['CallBack'] = 'http://stl.olfreelancer.com/callback.php?';
	
Then you can edit the "callback.php" file if you like.
	session_start();
	require_once ('SnowTigerLib.php');
	$o = new SnowTigerLib( $_SESSION['token']['oauth_token'] , $_SESSION['token']['oauth_token_secret']  );
	
	$access_key = $o->getRequestAccessToken(  $_REQUEST['oauth_verifier'] ) ;
	
	//You can save the access_key to your database,then you can use them at the next time without Authorize again
	$_SESSION['access_key'] = $access_key;
	//Redirect to any page you want
	Header("Location:examples/index.php");
	
Now simply include "SnowTigerLib.php" in your document.For example:
	session_start();
	require_once ('../SnowTigerLib.php');
	if (!isset ($_SESSION['access_key'])) {
		$stl = new SnowTigerLib();
		$token = $stl->getRequestToken();
		$_SESSION['token'] = $token;
		echo '<a href="'.$stl->getAuthorizeURL().'">Authorize with Freelancer.com</a><br/>';
	}else{
		$stl = new SnowTigerLib($_SESSION['access_key']['oauth_token'], $_SESSION['access_key']['oauth_token_secret']);
		
		//get the Account Details
		$accountDetail = $stl->getAccountDetails()->getArrayData();
		
		echo '<h1>Welcome,'.$accountDetail['fullname'].'</h1><br/>';
	}