Google Civic Information API . divisions

Instance Methods

close()

Close httplib2 connections.

search(query=None, x__xgafv=None)

Searches for political divisions by their natural name or OCD ID.

Method Details

close()
Close httplib2 connections.
search(query=None, x__xgafv=None)
Searches for political divisions by their natural name or OCD ID.

Args:
  query: string, The search query. Queries can cover any parts of a OCD ID or a human readable division name. All words given in the query are treated as required patterns. In addition to that, most query operators of the Apache Lucene library are supported. See http://lucene.apache.org/core/2_9_4/queryparsersyntax.html
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # The result of a division search query.
  "kind": "civicinfo#divisionSearchResponse", # Identifies what kind of resource this is. Value: the fixed string "civicinfo#divisionSearchResponse".
  "results": [
    { # Represents a political geographic division that matches the requested query.
      "aliases": [ # Other Open Civic Data identifiers that refer to the same division -- for example, those that refer to other political divisions whose boundaries are defined to be coterminous with this one. For example, ocd-division/country:us/state:wy will include an alias of ocd-division/country:us/state:wy/cd:1, since Wyoming has only one Congressional district.
        "A String",
      ],
      "name": "A String", # The name of the division.
      "ocdId": "A String", # The unique Open Civic Data identifier for this division
    },
  ],
}