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 (c) 2011 Zilverline / Daniƫl van Hoesel. See LICENSE for details.