Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A node.js module to use the Open North Represent API

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .npmignore
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 index.js
Octocat-spinner-32 package.json
README.md

Represent

Build Status

A simple wrapper for the district and politician data from Represent.

Usage

npm install represent

Boundary Sets

Example response: http://represent.opennorth.ca/boundary-sets/federal-electoral-districts/?format=apibrowser

represent.boundarySets("federal-electoral-districts", function(error, data) {});

Boundaries

Example response: http://represent.opennorth.ca/boundaries/toronto-wards/?format=apibrowser

represent.boundaries("toronto-wards", function(error, data) {});

From latitude and longitude

Example response: http://represent.opennorth.ca/boundaries/?contains=45.524,-73.596&format=apibrowser

represent.boundariesLatLon(45.524, -73.596, function(error, data) {});

Postal Codes

Example response: http://represent.opennorth.ca/postcodes/L5G4L3/?format=apibrowser

represent.postalCode("L5G4L3", function(error, data) {});

Representatives from latitude and longitude

Example response: http://represent.opennorth.ca/representatives/?point=45.524,-73.596&format=apibrowser

represent.representativesLatLon(45.524, -73.596, function(error, data) {});

Todos

  • add caching

License

MIT licensed. See LICENSE file.

Something went wrong with that request. Please try again.