0.1.1 • Published 7 years ago
guidestar-api v0.1.1
GuideStarApi
A friendly wrapper around GuideStar's REST API using axios
Getting started
Get sandbox API keys here
$ npm install guidestar-api
Usage
const GuidestarApi = require('guidestar-api');
const guidestar = new GuidestarApi({
searchApiKey: 'YOUR_SEARCH_API_KEY',
checkApiKey: 'YOUR_CHECK_API_KEY',
detailApiKey: 'YOUR_DETAILS_API_KEY',
useSandbox: true
});
const GuideStarEIN = '54-1774039'
guidestar.check(GuideStarEIN).then((response) => {
const organization = response.data;
console.log('org ', organization)
}).catch((error) => {
console.log(error);
})
guidestar.search('organization_name:"red cross"').then((response) => {
const organizations = response.data.hits;
console.log(JSON.stringify(response.data));
}).catch((error) => {
console.log('error', error);
});