Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

companies_house_api

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

companies_house_api

  • 0.2.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

CompaniesHouse

The CompaniesHouse gem provides a wrapper around the Companies House API. Two methods are currently provided. One to search the Companies House database against a given string. The second to retrieve company information given a company number.

Installation

Add this line to your application's Gemfile:

gem 'companies_house_api'

And then execute:

$ bundle

Or install it yourself as:

$ gem install companies_house_api

Usage

An API key is required which can be obtained by registering with Companies House.

Configure the gem using a block in an initializer:

CompaniesHouse.configure do |config|
  config.api_key = "your_api_key_here"
end

Planning ahead for future development, there are two classes, Search and Company Information.

To search for company information, configure as above and then instantiate a new instance of the Search class.

ch = CompaniesHouse::Search.new
ch.search_companies("captured sparks")

This returns a plain ruby object with two attributes: a count of how many results are returned for the search and an array of those results.

To retrieve company information:

ch = CompaniesHouse::CompanyInformation.new
ch.company_profile("07577596")
ch.registered_office_address("07577596")

Again, these return plain ruby objects with attributes as shown in the API documentation for the named methods.

Contributing

  1. Fork it ( https://github.com/[my-github-username]/companies_house_api/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

FAQs

Package last updated on 26 Feb 2016

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc