You are here: Home Plone products collective.cicero

collective.cicero (1.1)

1
by Olha Pelishok last modified 2011-09-02
0.0
0.0
0.0
0.0
Released on 2011-08-29 by David Glick under GPL - GNU General Public License available for All platforms.
Software development stage: stable
Provides access to Azavea's Cicero API for legistrative district matching and elected official info

collective.cicero provides access to Azavea's Cicero API for performing geography-based lookups of political data. It is designed for integration with Plone, but can be used in other contexts as well.

Usage

Access to the API is provided via the call_cicero method:

call_cicero(service_name, method_name, *args, **kw)

service_name is one of the Cicero web services. Currently the only supported option is 'ElectedOfficialQueryService'.

method_name is one of the SOAP methods supported by the chosen service.

*args and **kw are the additional parameters required by the chosen method. See the Cicero API documentation for details.

Settings

The Cicero credentials (username and password) are looked up via a plone.registry-style IRegistry utility. In Plone, activating the plone.app.registry package followed by collective.cicero will set up a suitable registry with the relevant settings available.

Test Mode

A test mode is supported. In test mode, canned responses will be loaded from disk instead of actually querying Cicero.

Enable test mode by setting the CICERO_TEST environment variable. If this variable is present in the operating system environment, test mode will be used.

For test mode to work, the tests folder must contain a copy of the WSDL for the service being tested, as well as a response file for the method being tested. Responses can be obtained by running in normal mode with suds configured to log at the debug level. A sample response for the GetOfficialsByAddress method of the ElectedOfficialQueryService is included.

Document Actions
Powered by Plone