Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Ruby wrapper for the OpenKVK api
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
.gitignore
Gemfile
LICENSE.mkd
README.mkd
Rakefile
openkvk.gemspec

README.mkd

OpenKVK: Ruby wrapper for the OpenKVK api

Installation

gem install openkvk

Usage Examples

General:

require "openkvk"

# default api finders
company = OpenKVK.find("Zilverline B.V.", :count => :first)
company = OpenKVK.find("Zilverline").first
company = OpenKVK.find_by_bedrijfsnaam("Zilverline B.V.", :count => :first)
company = OpenKVK.find_by_kvk("343774520000", :count => :first)
company = OpenKVK.find(:conditions => ["bedrijfsnaam = 'Zilverline B.V.'", "kvk = '343774520000'"], :count => :first)
company = OpenKVK.find(:conditions => ["bedrijfsnaam = 'FooBar'", "kvk = '343774520000'"], :match => :any, :count => :first)

# full text search api
company = OpenKVK.search("zIlVeRlInE").first

puts company.bedrijfsnaam 
 #=> "Zilverline B.V."
puts company.kvk
 #=> "343774520000"
puts company.adres
 #=> "Molukkenstraat 200 E4"
puts company.plaats
 #=> "Amsterdam"
puts company.postcode
 #=> "1098TW"
puts company.type
 #=> "Hoofdvestiging"
puts company.website
 #=> nil

Testing

Run all tests:

rake

Copyright

Copyright (c) 2011 Zilverline / Daniël van Hoesel. See LICENSE for details.

Something went wrong with that request. Please try again.