No commit activity in last 3 years
No release in over 3 years
Ruby library for interacting with Companies House API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.9
~> 0.9.2
>= 0
~> 1.1.0
~> 10.0
~> 3.2
~> 1.24
 Project Readme

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