This is an RSS feed with frequently updated content issued by the Mayor's Office (City Hall).
====================To use the included Python Library, you must first import it:
import CityHall
If the library fails to import, make sure python is set to search the directory that the file is located in. Then restart python and try again.
Creating a CityHall CHF object and setting the API Key/ID:
myobj = CityHall.CHF('API ID' , 'API Key')
Changing the API Key or ID for a CityHall CHF object that was already created:
cityHallObj.setID('NewID')
cityHallObj.setKey('NewKey')
Getting the API Key or ID for a CityHall CHF object that was already created:
cityHallObj.getID()
cityHallObj.getKey()
Get press releases from City hall using your Cityhall CHF object:
pressReleases = cityHallObj.getCityHallFeed()
To print the press releases in text format:
print pressReleases.text
For further documentation and examples, see the integrated help Doc in python:
help(CityHall)