This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.
There is no license information available for the latest version (dev-master) of this package.

Google Civic API Client

dev-master 2013-07-10 18:40 UTC

This package is not auto-updated.

Last update: 2021-11-22 13:42:15 UTC


This is a minimalistic API client for Google Civic API


Installation is conveniently provided via Composer.

To get started, install composer in your project:

$ curl -s | php

Next, add a composer.json file containing the following:

    "require": {
        "google/civic-client": "dev-master"

Finally, install!

$ php composer.phar install


Using the Google Civic client is easy:


require_once '../src/Client.php';

try {
    $client = new GoolgeCivic('YOUR API KEY');
    $result = $client->getElections();
} catch (Exception $e) {
    echo $e->getMessage();