PHP wrapper for the Spark REST API

dev-master 2021-11-28 01:26 UTC

This package is not auto-updated.

Last update: 2024-06-14 22:36:09 UTC


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

Usage Examples

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

// connect using Access Token Authentication (additional authentication methods available in the wiki)
$api = new SparkAPI_Bearer("your_access_token_here");

// identify your application (optional)

// 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.