Skip to content
Simple PHP SDK for the Close.io REST API
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib Inception Jul 26, 2013
test TODO README section Jul 26, 2013
.gitignore Inception Jul 26, 2013
LICENSE
Makefile
README.md Update README.md Jul 26, 2013

README.md

Close.io PHP SDK

Very simple PHP SDK for Close.io's REST API

Usage

define('CLOSEIO_DEBUG', true);
// Define CLOSEIO_API_KEY in your env or place as the value here
define('CLOSEIO_API_KEY', getenv('CLOSEIO_API_KEY'));

require('closeio-php-sdk/lib/Closeio.php');

$lead_data = new StdClass();
$lead_data->name = "Test User";

$lead = new Closeio\Lead();
$lead_data = new StdClass();
$lead_data->name = "Test D00d3";
$result = $lead->create($lead_data);

$lead_id = $result->id;
$lead = new Closeio\Lead($lead_id);

$update = new StdClass();
$update->name = 'Test Dood Updated';
$result = $lead->update($update);

$result = $lead->delete();

TODO

Currently, only the leads route of the API has been implemented.

It is easy to add other API routes to the SDK. Have a look at the Leads class to see how this is done. PR's welcome :)

You can’t perform that action at this time.