Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update README to reference everypolitician-ruby #33

Open
davewhiteland opened this issue Jul 15, 2016 · 2 comments
Open

update README to reference everypolitician-ruby #33

davewhiteland opened this issue Jul 15, 2016 · 2 comments
Assignees

Comments

@davewhiteland
Copy link
Contributor

The everypolitician-ruby gem is an easy way to get everypolitician-popolo data, so the README should explicitly say that.

See also everypolitician/everypolitician-ruby#15 which is doing the same, linking back the other way.

@davewhiteland davewhiteland self-assigned this Jul 15, 2016
@tmtmtmtm
Copy link
Contributor

@davewhiteland did you assign this to yourself because you're actually working on it, or just as a statement of intent for some future point?

@chrismytton
Copy link
Contributor

Looks like this was done in 754bfbb, however the example given doesn't actually work 😞

$ cat example.rb 
require 'everypolitician'

australia = Everypolitician::Index.new.country('Australia')
australia.code # => "AU"
senate = australia.legislature('Senate')
senate.persons.find_by(name: "Aden Ridgeway")

$ ruby example.rb 
example.rb:6:in `<main>': undefined method `persons' for #<Everypolitician::Legislature:0x007fa8e2018050> (NoMethodError)
Did you mean?  person_count

This is because there's no Legislature#persons method, you have to go through Legislature#popolo.

senate.popolo.persons.find_by(name: "Aden Ridgeway")

I wonder if perhaps there should be a Legislature#persons method in everypolitician-ruby?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants