NOTE: This is an unofficial ruby gem. The developer is not connected to USASpending.gov
The USA Spending Gem wraps around the Feeral Procurement Database located at usaspending.gov. Complete documentation can be found at http://www.usaspending.gov/learn?tab=About%20the%20Data
This gem requires:
- XmlSimple
$ sudo gem install xmlsimple
$ sudo gem install usaspending
Initialize the search
>> s = USA::Procurement.new
Add the qualifiers
>> s.detail("b").max_records(69).years(2009).state("MO")
Fetch the contracts, returns an array of contract objects
>> s.fetch_contracts
Access a contract’s attributes
>>contract = s.fetch_contracts.first
>>contract.dollarsobligated