A fast REST API to access information on Members of Parliament. Directory of MPs is an example application based on this.
- XML
- JSON
The API is hosted at http://api.myminister.info
. Access it like http://api.myminister.info/[rest url]
. eg. http://api.myminister.info/mps.xml
- Get all MPs
GET /mps.xml
GET /mps.json
- Get MP by Constituency
GET /constituencies/[constituency_id]/mp.xml
GET /constituencies/[constituency_id]/mp.json
- Get MPs by State
GET /states/[state_id]/mps.xml
GET /states/[state_id]/mps.json
- Get MP
GET /mps/[mp_id].xml
GET /mps/[mp_id].json
- Get MPs by Party
GET /parties/[party_id]/mps.xml
GET /parties/[party_id]/mps.json
- Search MPs, Parties, Constituencies, States by Name
GET /search/[mp|party|constituency]/[name match].xml
GET /search/[mp|party|constituency]/[name match].json
- Get all States and Union Territories
GET /states.xml
GET /states.json
- Get all Constituencies
GET /constituencies.xml
GET /constituencies.json
- Get Constituencies By State
GET /states/[state_id_]/constituencies.xml
GET /states/[state_id_]/constituencies.json
A snapshot of the db is at RAILS_ROOT/data/snapshot.sqlite3
. Run rake data:import
to import fresh MP information to RAILS_ROOT/data/test.sqlite3
- Add PRS published data
- Show that on Directory.MyMinister
- API for badges
- Badges App
- Identify cabinet ministers