Sha256: 14435e43981b62a8d111127d066835fe741cbabacb658f6e1d0c53bf2baf32b0

Contents?: true

Size: 434 Bytes

Versions: 45

Compression:

Stored size: 434 Bytes

Contents

require 'rubygems'
require 'crack'

dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
require File.join(dir, 'httparty')
require 'pp'

class Rep
  include HTTParty

  parser(
    Proc.new do |body, format|
      Crack::XML.parse(body)
    end
  )
end

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

Version data entries

45 entries across 45 versions & 4 rubygems

Version Path
plyom_user-0.3.1 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/examples/crack.rb
plyom_user-0.3.0 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/examples/crack.rb
plyom_user-0.2.9 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/examples/crack.rb
plyom_user-0.2.8 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/examples/crack.rb
plyom_user-0.2.7 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/examples/crack.rb
plyom_user-0.2.6 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/examples/crack.rb
plyom_user-0.2.5 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/examples/crack.rb
plyom_user-0.2.4 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/examples/crack.rb
plyom_user-0.2.3 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/examples/crack.rb
plyom_user-0.2.2 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/examples/crack.rb
plyom_user-0.2.1 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/examples/crack.rb
plyom_user-0.2.0 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/examples/crack.rb
plyom_user-0.1.9 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/examples/crack.rb
plyom_user-0.1.8 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/examples/crack.rb
plyom_user-0.1.7 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/examples/crack.rb
plyom_user-0.1.6 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/examples/crack.rb
plyom_user-0.1.5 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/examples/crack.rb
plyom_user-0.1.4 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/examples/crack.rb
plyom_user-0.1.3 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/examples/crack.rb
plyom_user-0.1.2 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/examples/crack.rb