-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
I cannot get the gem to connect to the API, though I did write my own Faraday based adapter that worked fine for my needs.
Is this gem still supported?
The example code exceptions out:
irb(main):010:0> congresspeople = Sunlight::Legislator.all_for(:address => "123 Fifth Ave New York, NY 10003")
OpenURI::HTTPError: 403 Forbidden
from /Users/stardestroyer/.rbenv/versions/2.2.2/lib/ruby/2.2.0/open-uri.rb:358:in `open_http'
from /Users/stardestroyer/.rbenv/versions/2.2.2/lib/ruby/2.2.0/open-uri.rb:736:in `buffer_open'
from /Users/stardestroyer/.rbenv/versions/2.2.2/lib/ruby/2.2.0/open-uri.rb:211:in `block in open_loop'
from /Users/stardestroyer/.rbenv/versions/2.2.2/lib/ruby/2.2.0/open-uri.rb:209:in `catch'
from /Users/stardestroyer/.rbenv/versions/2.2.2/lib/ruby/2.2.0/open-uri.rb:209:in `open_loop'
from /Users/stardestroyer/.rbenv/versions/2.2.2/lib/ruby/2.2.0/open-uri.rb:150:in `open_uri'
from /Users/stardestroyer/.rbenv/versions/2.2.2/lib/ruby/2.2.0/open-uri.rb:716:in `open'
from /Users/stardestroyer/.rbenv/versions/2.2.2/lib/ruby/2.2.0/open-uri.rb:34:in `open'
from /Users/stardestroyer/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/ym4r-0.6.1/lib/ym4r/google_maps/geocoding.rb:23:in `get'
from /Users/stardestroyer/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sunlight-1.1.0/lib/sunlight/district.rb:26:in `get'
from /Users/stardestroyer/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sunlight-1.1.0/lib/sunlight/legislator.rb:71:in `all_for'
from (irb):10
And the other example returns nil, but I was able to hit this endpoint fine from Faraday.
irb(main):011:0> Sunlight::Legislator.all_in_zipcode(90210)
=> nil
Metadata
Metadata
Assignees
Labels
No labels