library votesmart-php
votesmart.org API wrapper in php
scragg0x/votesmart-php
votesmart.org API wrapper in php
- Saturday, July 6, 2013
- by scragg0x
- Repository
- 1 Watchers
- 0 Stars
- 15 Installations
- 0 Dependents
- 0 Suggesters
- 1 Forks
- 0 Open issues
- 1 Versions
- 0 % Grown
votesmart-php
VERY simple api wrapper for votesmart.org., (*1)
Install
The recommended way is through
composer. Just create a composer.json
file and
run the php composer.phar install
command to install it:, (*2)
{
"require": {
"scragg0x/votesmart-php": "dev-master"
}
}
API Reference
http://votesmart.org/share/api, (*3)
Example
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() );