Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/gov_kit/follow_the_money.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module GovKit

# Subclass of {Resource} for FollowTheMoney data. This
# Subclass of {Resource} for FollowTheMoney data. This
# is subclassed further for each of the different types of record
# returned by FollowTheMoney.
#
Expand Down Expand Up @@ -42,7 +42,7 @@ def self.get_xml(path, options)

doc
end

# Convert the hash array returned by Nokogiri, which has Nokogiri::XML::Attr objects as values,
# to an array of hashes with string values.
#
Expand All @@ -53,7 +53,7 @@ def self.stringify_values_of(result)
end
end

# Provides classes to wrap {http://www.followthemoney.org/index.phtml FollowTheMoney} data.
# Provides classes to wrap {http://www.followthemoney.org/index.phtml FollowTheMoney} data.
#
# For the details on the FollowTheMoney queries, see {http://www.followthemoney.org/services/methods.phtml the FollowTheMoney API documentation}.
module FollowTheMoney
Expand Down Expand Up @@ -115,7 +115,7 @@ def self.find(nimsp_id)
#
# @return [[Contribution]] an array of Contribution objects.
def self.top(nimsp_id)
doc = get_xml("/candidates.top_contributor.php", :query => {"imsp_candidate_id" => nimsp_id})
doc = get_xml("/candidates.top_contributors.php", :query => {"imsp_candidate_id" => nimsp_id})
result = doc.search('//top_contributor').collect { |x| x.attributes }

stringify_values_of(result)
Expand Down
3 changes: 2 additions & 1 deletion lib/govkit.rb
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
require 'gov_kit'
#require File.expand_path('../govkit', __FILE__)
require_relative 'gov_kit'