Class: GovKit::TransparencyData::Contract

Inherits:
GovKit::TransparencyDataResource show all
Defined in:
lib/gov_kit/transparency_data.rb

Overview

Represents government contracts.

See transparencydata.com/api/contracts/ for complete query options.

Instance Attribute Summary

Attributes inherited from Resource

#attributes, #raw_response

Class Method Summary collapse

Methods inherited from GovKit::TransparencyDataResource

from_response, search_for

Methods inherited from Resource

#initialize, instantiate, instantiate_collection, parse, #to_md5, #unload

Constructor Details

This class inherits a constructor from GovKit::Resource

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class GovKit::Resource

Class Method Details

.search(ops = {}) ⇒ Object

Search for contract records.

Example query:

contracts = GovKit::TransparencyData::Contract.search( { :per_page => 2, :fiscal_year => 2008 } )


57
58
59
# File 'lib/gov_kit/transparency_data.rb', line 57

def self.search(ops = {})
  search_for('/contracts.json', ops)
end