No commit activity in last 3 years
No release in over 3 years
Ruby Client for represent.opennorth.ca's API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
~> 1.3
>= 0
>= 0
~> 3.0.0.beta1

Runtime

~> 1.20
 Project Readme

Opennorth::Represent

Ruby Client for represent.opennorth.ca's API.

Installation

Add this line to your application's Gemfile:

gem 'opennorth-represent'

And then execute:

$ bundle

Or install it yourself as:

$ gem install opennorth-represent

Usage

require 'opennorth/represent'

service = Opennorth::Represent.new

postal_code = service.postal_codes.get("V6H2V4") # or your own postal code

member_of_parliament = postal_code.representatives.where(elected_office: "MP").first
hill_office = member_of_parliament.offices.where(type: "legislature").first

puts "To: #{member_of_parliament.honorific_prefix} #{member_of_parliament.name}"
puts "#{hill_office.postal}"
puts
puts "Dear, #{member_of_parliament.name}"
puts
puts "My message goes here"
puts
puts "Yours truly,"
puts "A constituent"

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request