0.0
No commit activity in last 3 years
No release in over 3 years
Ruby gem wrapper for USAspending.gov
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

USA Spending API Wrapper

NOTE: This is an unofficial ruby gem. The developer is not connected to USASpending.gov

Description

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

Installation

This gem requires:

  • XmlSimple

$ sudo gem install xmlsimple

$ sudo gem install usaspending

Usage

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