Socket
Socket
Sign inDemoInstall

companies-house-api-es6

Package Overview
Dependencies
3
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.2

2

package.json
{
"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)
~~~
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc