A PHP wrapper for the flexmls REST API.
Latest commit 39c8e49 Sep 18, 2015 @dgmyrek dgmyrek Merge pull request #37 from dgmyrek/master
Added support for new SparkQLErrors attribute in responses
Failed to load latest commit information.
lib Merge pull request #37 from dgmyrek/master Sep 18, 2015
.travis.yml Travis CI integration Dec 17, 2012
LICENSE Initial push to GitHub Feb 6, 2012
README.md Fixed Travis CI image from readme. Dec 17, 2012
composer.json Added Composer support Oct 22, 2012
examples.php Removed developers domain Oct 16, 2012
phpunit.xml Added a phpunit.xml to handle the test bootstrapping, so that the tes… Oct 22, 2012


Build Status

Spark API - version 2

A PHP wrapper for the Spark REST API. This version has enough differences from version 1 that upgrading will require changes to existing code.


For additional information on the PHP client, visit the wiki.

For full information on the API, see http://sparkplatform.com/docs

Usage Examples

// include the Spark core which autoloads other classes as necessary

// connect using Spark API authentication
$api = new SparkAPI_APIAuth("api_key_goes_here", "api_secret_goes_here");

// identify your application (optional)

// authenticate
$result = $api->Authenticate();
if ($result === false) {
    echo "API Error Code: {$api->last_error_code}<br>\n";
    echo "API Error Message: {$api->last_error_mess}<br>\n";

// get your listings
$result = $api->GetMyListings();

    Alternatively, if you cannot find the appropriate helper method,
    try our "get", "post", "put", or "delete" methods from Core.php. 
$result = $api->get("my/listings");

// see the included examples.php for more complete usage

Error Codes

A list of all API error codes can be found here.