CodeIgniter VoteSmart API Library

This is a pretty straight-forward library for CodeIgniter that allows you to access the VoteSmart API.

To get it working, simply drop config/votesmart.php into your config directory, and libraries/votesmart.php into your libraries directory. Load the library in your controller

$this->load->library('votesmart');

The call the votesmart query function like this:

$this->votesmart->query('CandidateBio.getBio', Array('candidateId' => 9026));

The first parameter is the API method you’re calling. The second parameter is an array of required variables, if needed. All the available methods can be found here.

You can download the code at GitHub