File: whoismyrep.rb

package info (click to toggle)
ruby-httparty 0.16.2%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 840 kB
  • sloc: ruby: 5,567; xml: 425; sh: 35; makefile: 12
file content (10 lines) | stat: -rw-r--r-- 313 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
require File.join(dir, 'httparty')
require 'pp'

class Rep
  include HTTParty
end

pp Rep.get('http://whoismyrepresentative.com/getall_mems.php?zip=46544')
pp Rep.get('http://whoismyrepresentative.com/getall_mems.php', query: { zip: 46544 })