-
-
05 Mar 2021 22:17:11 UTC
- Distribution: Net-Google-CivicInformation
- Module version: 1.02
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Repository
- Issues (0)
- Testers (190 / 0 / 0)
- Kwalitee
Bus factor: 1- % Coverage
- License: perl_5
- Perl: v5.10.0
- Activity
24 month- Tools
- Download (11.81KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
VERSION
version 1.02
NAME
Net::Google::CivicInformation::Representatives - All elected representatives for US addresses
SYNOPSIS
my $client = Net::Google::CivicInformation::Representatives->new( api_key => '***' ); my $res = $client->representatives_for_address('123 Main St Springfield MO 12345'); if ( $res->{error} ) { # handle the error hash returned } else { for my $official ( $res->{officals} ) { # use the data hash } }
METHODS
- representatives_for_address (NonEmptyStr $address)
-
Requires an address string as the only argument.
On error, the response will contain a key
error
containing a hashref like:{ 'error' => { 'code' => 400, 'errors' => [ { 'domain' => 'global', 'message' => 'Failed to parse address', 'reason' => 'parseError' } ], 'message' => 'Failed to parse address' } }
On success, the response will contain a key
officials
containing an arrayref of hashrefs, ordered by descending seniority (head of state down). Each hashref represents a single official: there may be more than one record at the same "rank." The hashref will contain the following keys:
AUTHOR
Nick Tonkin <tonkin@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2021 by Nick Tonkin.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Module Install Instructions
To install Net::Google::CivicInformation, copy and paste the appropriate command in to your terminal.
cpanm Net::Google::CivicInformation
perl -MCPAN -e shell install Net::Google::CivicInformation
For more information on module installation, please visit the detailed CPAN module installation guide.