samwisejs
v0.0.5
Published
A simple SAM API wrapper.
Downloads
2
Maintainers
Readme
samwise
A simple SAM API wrapper inspired by https://github.com/18F/samwise
npm install samwisejs
Interfaces
var Samwise = require('samwisejs');
Samwise.Api.searchEntities(API_KEY, TERMS, function(error, entities) {});
Samwise.Api.getRegistration(API_KEY, DUNS, function(error, registration) {});
Samwise.Api.getGovBusinessPointOfContact(API_KEY, DUNS, function(error, contact) {});
Example
var Samwise = require('samwisejs');
var DUNS = '1234567'; // 7,8,9 and 13 digit duns with/without dashes are accepted
var DG_API_KEY = 'DEMO_KEY'; // get at https://api.data.gov/signup/
var searchTerms = 'Technology'; // http://gsa.github.io/sam_api/sam/search.html
Samwise.Api.searchEntities(DG_API_KEY, searchTerms, function(error, entities) {
if(!error && entities.length > 0) {
for (entity in entities) {
console.log(entities[entity].legalBusinessName);
}
} else {
console.log(error);
}
});
Build
gulp
OR
npm test
Browserify
npm run browserify