dalager / oiorest forked from jacobat/oiorest

Library for accessing the Danish OIO Rest information

This URL has Read+Write access

Christian Dalager (author)
Sun May 18 04:35:11 -0700 2008
commit  06e8bc0e92c35890a18099b260c0d645cc9c191c
tree    6dc6fe8f9d9784983a43d95ccb1a239d87e468d4
parent  54fbfc69c57d018f518391fd039f6b8af7f08593
oiorest / README
100644 40 lines (26 sloc) 1.009 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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