Skip to content

danmelton/usaspending

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Unofficial ruby gem wrapper for usaspending.gov API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages