Skip to content

CityOfNewYork/City-Hall-Data-Feeds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

City-Hall-Data-Feeds

This is an RSS feed with frequently updated content issued by the Mayor's Office (City Hall).

====================

Import The Library

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.

Create the CityHall Feed Object

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)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages