VERY simple api wrapper for votesmart.org.
The recommended way is through
composer. Just create a composer.json
file and
run the php composer.phar install
command to install it:
{
"require": {
"scragg0x/votesmart-php": "dev-master"
}
}
http://votesmart.org/share/api
require_once __DIR__ . "/../vendor/autoload.php";
use VoteSmart\Client;
// You need to obtain a key
$key = '';
$c = new Client($key, 'json');
print_r( $c->get('Officials.getByZip', array('zip5' => 76131))->json() );