Adding new Vote Smart methods (Issue #29) #30

merged 4 commits into from Jul 21, 2012


None yet

2 participants

ajb commented Jun 23, 2012

Adding a few methods that I find useful to the Vote Smart library. No tests written, since there don't seem to be any for Vote Smart in the first place.


Looks good to me, I vote merge.

ajb commented Jun 29, 2012

Thanks for the vote of confidence (no pun intended...) -- although the more I'm using the VS API, the more I realize that there needs to be a more robust wrapper in place to deal with VS's inconsistencies.

Vote Smart doesn't know the difference between an object and an array of objects, which makes us need this code in order to process both and

    if response['cities']['city'].instance_of?(Array)
      [ parse(response['cities']['city']) ]         

I'm in contact with VoteSmart's "IT" department, and I'll let you guys know if I hear anything useful.

@NateBarnes NateBarnes merged commit 15e3072 into opengovernment:master Jul 21, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment