eea.google.api
==============
A python package that provides a low level Google Connection and a generic
connection error GoogleClientError. To use this connection you'll need an
AuthBase authentication token.

    >>> from eea.google.api import Connection
    >>> from eea.google.api import GoogleClientError
    >>> google = Connection(token='CSAJKGSDWUI__WCDK')

If the token you provided is a single-session one you can exchange it for a
multi-session one by calling:

    >>> # google.token2session()

Now you are connected with Google, and can check connection status:

    >>> # google.status

Or make some calls:

    >>> scope = '/analytics/feeds/data'
    >>> data = {
    ...     'ids': 'ga:23124234',
    ...     'dimensions': 'ga:pagePath',
    ...     'metrics': 'ga:pageviews',
    ...     'filters': 'ga:pagePath=@matchtest-in-path',
    ...     'sort': '-ga:pageviews',
    ...     'start-date': '2009-01-01',
    ...     'end-date': '2012-12-31',
    ...     'start-index': 1,
    ...     'max-results': 5,
    ... }
    >>> # google(scope, data, method='GET')

If something is wrong this will raise a GoogleClientError. To avoid this you can
make a request instead of a call:

    >>> # google.request(scope, data, method="GET")

This will return None if Google doesn't like your request or a Response object
of type text/xml which you can parse with your prefered xml parser.
