public
Fork of jacobat/oiorest
Description: Library for accessing the Danish OIO Rest information
Clone URL: git://github.com/dalager/oiorest.git
name age message
file MIT-LICENSE Wed May 07 11:07:52 -0700 2008 Adding README patch from olleolleolle [christian@dalager.com]
file README Sun May 18 04:35:11 -0700 2008 Added Adresse model, first version. Search work... [Christian Dalager]
file Rakefile Sat Apr 05 11:17:40 -0700 2008 Converted project to rails plugin. [christian@dalager.com]
file init.rb Sun May 18 04:35:11 -0700 2008 Added Adresse model, first version. Search work... [Christian Dalager]
file install.rb Sat Apr 05 11:17:40 -0700 2008 Converted project to rails plugin. [christian@dalager.com]
directory lib/ Sun May 18 04:35:11 -0700 2008 Added Adresse model, first version. Search work... [Christian Dalager]
directory tasks/ Sat Apr 05 11:17:40 -0700 2008 Converted project to rails plugin. [christian@dalager.com]
directory test/ Sat Apr 05 11:17:40 -0700 2008 Converted project to rails plugin. [christian@dalager.com]
file uninstall.rb Sat Apr 05 11:17:40 -0700 2008 Converted project to rails plugin. [christian@dalager.com]
README
ActiveOio
=========

ActiveOIO is a Ruby on Rails ActiveOIO extension to Danish public data.

You can read more about it at http://code.google.com/p/oiorest/


Example
=======

# Find all
Kommune.find(:all)

# Find one
Postdistrikt.find(8830)

# Search by name
Postdistrikt.find_by_name('borg')

# Adresser

# This is a finder with all possible search params.
# returns an Address-light, with a reduced subset of the full Adresse.
Adresse.find(:all, :params => {:vejnavn => "lyongade", :husnr => "19", :postnr => "2300", :vejnr => "4492", :kommunenr 
=> "101", :sognenr => "7084"})

# direct access
 Adresse.find(9718)

# find the first hit -- fully expanded address object
Adresse.find(:first,:params => {:vejnavn => "lyongade", :husnr => "19"})



TODO
========
* lokaliteter => make drill down to full-address level
* Unittests against stubbed responses. Should we hack Active Resource to do that?
* Integration tests against oiorest.dk/danmark
* Script to port github commits into subversion on Google Code