companies-house-api-es6
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "companies-house-api-es6", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "This service will do a companies house lookup for a registered UK company", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -14,12 +14,6 @@ # Companies House | ||
const cha = new CHA('YOUR_API_KEY'); | ||
~~~ | ||
## Search Methods | ||
Here is an example | ||
~~~js | ||
/** | ||
* This method performs a request to Companies House to search for a company by ID | ||
* @param id | ||
* @returns {Promise} | ||
*/ | ||
cha.searchForCompanyById(companyID).then(result => { | ||
@@ -30,47 +24,15 @@ console.log(result); | ||
}); | ||
~~~ | ||
## Search Methods | ||
/** | ||
* This method performs a request to Companies House to search for a company by a generic search term. You can add an optional item count by overloading the function with the desired total, default is 10 | ||
* @param q | ||
* @param itemCount? Optional | ||
* @returns {Promise} | ||
*/ | ||
cha.searchForCompanyByGenericTerm(query).then(result => { | ||
console.log(result); | ||
}).catch(err => { | ||
console.log(err); | ||
}); | ||
~~~js | ||
searchForCompanyById(id) | ||
/** | ||
* This method performs a request to Companies House to search across all indexed items by a generic search term. You can add an optional item count by overloading the function with the desired total, default is 10 | ||
* @param q | ||
* @returns {Promise} | ||
*/ | ||
cha.searchAll(query).then(result => { | ||
console.log(result); | ||
}).catch(err => { | ||
console.log(err); | ||
}); | ||
//These methods can take an optional second argument which | ||
is an integer limit of how many results you want back | ||
/** | ||
* This method performs a request to Companies House to search for company officers by a generic search term. You can add an optional item count by overloading the function with the desired total, default is 10 | ||
* @param q | ||
* @returns {Promise} | ||
*/ | ||
cha.searchForOfficer(query).then(result => { | ||
console.log(result); | ||
}).catch(err => { | ||
console.log(err); | ||
}); | ||
/** | ||
* This method performs a request to Companies House to search for disqualified officers by a generic search term. You can add an optional item count by overloading the function with the desired total, default is 10 | ||
* @param q | ||
* @returns {Promise} | ||
*/ | ||
cha.searchForDisqualifiedOfficer(query).then(result => { | ||
console.log(result); | ||
}).catch(err => { | ||
console.log(err); | ||
}); | ||
searchForCompanyByGenericTerm(query) | ||
searchAll(query) | ||
searchForOfficer(query) | ||
searchForDisqualifiedOfficer(query) | ||
~~~ |
9433
36