A Ruby client for Trade.gov's Consolidated Screening List.
client = ImportExport::Client.new :api_key => "12345"
client.search :q => "smith"
=> [
#<ImportExport::Result name="PRIDMORE-SMITH, BRAMWELL J.">,
#<ImportExport::Result name="PRIDMORE-SMITH, JOHN B.">
]
client.search :name => "smith", :fuzzy_name => true
=> [
#<ImportExport::Result name="PRIDMORE-SMITH, JOHN B.">,
#<ImportExport::Result name="PRIDMORE-SMITH, BRAMWELL J.">,
#<ImportExport::Result name="MID-SOUTH INVESTMENTS LIMITED">,
#<ImportExport::Result name="SOUTH-EAST MOVEMENT">,
...
]
NOTE: api_key
defaults to ENV["TRADE_API_KEY"]
if not specified.
q
sources
countries
(defaults to all countries)address
name
fuzzy_name
(true or false)type
size
(number of results per page, defaults to 100)offset
(defaults to 0)
For more information, see the Consolidated Screening List API docs.
import_export [NAME]
- Fork it (https://github.com/[my-github-username]/consolidated_screening_list/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request