Socket
Socket
Sign inDemoInstall

companies-house-api

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

companies-house-api

Companies House API client


Version published
Maintainers
1
Weekly downloads
21
increased by162.5%

Weekly downloads

Readme

Source
var CompaniesHouseAPI = require('companies-house-api');
var async = require('async');

var chapi = new CompaniesHouseAPI({apiKey: 'yourApiKey'});

async.waterfall(
    [
        function(next) {
            chapi.company('07296558', function(err, company) {
                next(err, company);
            });
        },
        function(company, next) {
            company.registeredOfficeAddress(function(err, registeredOfficeAddress) {
                next(err, company, registeredOfficeAddress);
            });
        },
        function(company, registeredOfficeAddress, next) {
            company.officers(function(err, officers) {
                next(err, company, registeredOfficeAddress, officers);
            });
        },
        function(company, registeredOfficeAddress, officers, next) {
            company.filingHistory(function(err, filingHistory) {
                next(err, company, registeredOfficeAddress, officers, filingHistory);
            });
        },
        function(company, registeredOfficeAddress, officers, filingHistory, next) {
            company.insolvency(function(err, insolvency) {
                next(err, company, registeredOfficeAddress, officers, filingHistory, insolvency);
            });
        }
    ],
    function(err, company, registeredOfficeAddress, officers, filingHistory, insolvency) {
        if (err) {
            console.log('Error: ' + err);
        }
        else {
            console.log('Company name: ' + company.company_name);
            console.log('Postcode: ' + registeredOfficeAddress.postal_code);
            console.log('Total officers: ' + officers.total_results);
            console.log('Total filing history count: ' + filingHistory.total_count);
            console.log('Insolvency dump: ' + insolvency);
        }
    }
);

FAQs

Last updated on 15 Apr 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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