Sha256: 53619cb258fbae2ec745a96a25f4bc5067abdbbc6a62a5db53a1ba84c5fa252a

Contents?: true

Size: 1.87 KB

Versions: 1

Compression:

Stored size: 1.87 KB

Contents

# NNEClient

Client library for interacting with the "Navne & Numre Erhverv" SOAP API.

## Installation

Add this line to your application's Gemfile:

    gem 'nne_client'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install nne_client

## Warning

NNEClient only works with the Net/HTTP and will force HTTPI to use this.

## Usage

If you need to provide an access key configure NNE Client with:

    NNEClient.configure do |config|
      config.access_key = 'some key'
    end

Searching for a company:

    result_set = NNEClient.search(:name => 'Lokalebasen')
    result_set.first.official_name
      => "Lokalebasen.dk A/S"

So far the following keys can be used for searching:

    :houseNo (string)
    :name (string)
    :nameStartsWith (boolean)
    :street (string)
    :zipCode (number)
    :tdcId (number)

Each entry in the result\_set has the following methods available for accessing
information about the company:

    ad_protection
    cvr_no
    district
    email
    founded_year
    homepage
    number_of_employees
    official_name
    p_no
    phone
    status_text
    street
    tdf_name
    zip_code

Additionally further information can be fetched through the methods:

    additional_names
    trades
    associates
    ownerships
    subsidiaries
    finances

## Configuration

NNEClient is based on Savon and HTTPI. You may use these libraries to control
logging. For example:

    HTTPI.log = false

    Savon.configure do |config|
      config.log = false            # disable logging
      config.log_level = :info      # changing the log level
      config.logger = Rails.logger  # using the Rails logger
    end

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nne_client-0.0.1 README.md