mySociety

TheyWorkForYou API

Matthew Somerville
BarCamp London
2–3 September 2006

A History

Current Scope

Staying on top

The API

Functions

getDebates, getWrans, getWMS
Meaty functions to return actual sections of Hansard. Results by date, year, search, person.
getMPs, getMP, getMPinfo, getLords, getLord
Fetch lists of MPs or Lords, or information about particular ones. Individual MPs can be looked up by id, constituency, or postcode
getConstituency
Given a postcode, this returns the constituency that postcode is in.
getConstituencies
Returns list of constituencies, filtered by date, search term, or proximity to a particular location
getCommittee
Fetches information on select committees, and their current members
getGeometry, getBoundary
These functions return geographical information for constituencies, such as bounding box, centre, area in square metres, and coordinates of its boundary.
getComments
Search/filter comments people have left.

Examples

convertURL

Postcode lookup

http://www.dracos.co.uk/work/theyworkforyou/api/postcode/

Simple postcode lookup

Maps

http://www.dracos.co.uk/work/theyworkforyou/api/map/

Map showing every constituency

Telnet MP Fight

Telnet MP Fight game

MP Fab Farts

MP Fab Farts

Nearby constituencies

Nearby constituencies

Future

The End

It’s all open source, so help, bug reports and patches are very welcome. :-)