PHP DIA API

a PHP library to talk to DemocracyInAction's API

usage

OO method:

require_once('DIA/API.php');
$api =& new DIA_API();
$key = $api->process('supporter', array('Email' => $email, 'First_Name' => $first_name));
$supporter = $api->getSupporter($key);

functional method (currently limited to get and process):

require_once('DIA/API.php');
dia_api_get('supporter', $key);
$key = dia_api_process('supporter', array('Email' => $email, 'First_Name' => $first_name));
$supporter = dia_api_get($key);

more examples can be found in the test directory

Attachments