#clj-offeneskoeln
A clojure library for the Offenes Köln api.
clj-offeneskoeln will soon be available from Clojars:
[clj-offeneskoeln "0.1.0"]Everything is available in clj-offeneskoeln.core namespace.
If you want to use it from the repl:
(use 'clj-offeneskoeln.core)If you want to use it in a project:
(ns your-fancy.app
(:require [clj-offeneskoeln :as k]))A request always looks like this:
(k/offenes-koeln req-type req-data)where req-type is a given map from:
- get-documents
- search-documents
- get-locations
- get-streets
- get-session
- get-terms
and req-data is a map with your values.
:reference- single or comma-separated document references:output- single or comma-separated output type (attachments, thumbnails, consultations, facets):sort-order- asc, desc date asc or date desc
:query- A query string. Supports Lucene query syntax:filter-query- Filter based on a document property. For example "type:Antrag". Lucene query syntax.- title
- term
- type
- person
- attachment
- session
- comittee
- street
:sort-order-:output- single or comma-separated output type (attachments, thumbnails, consultations, facets):maximum-results- Number of maximum returned documents:result-offset- How many documents to skip.:date-filter- Filter by date.
(k/offenes-koeln get-documents {:reference "2961/2011"})(k/offenes-koeln get-documents {:reference "2961/2011" :output "attachments"})(k/offenes-koeln get-documents {:reference "2961/2011" :output "attachments,thumbnails"})(k/offenes-koeln search-documents {:query "Bycicle"})(k/offenes-koeln search-documents {:filter-query "type:Antrag"})Get all Details for "Roncalliplatz"
(k/offenes-koeln get-locations {:street "Roncalliplatz"})Get the average location for "Marzellenstraße"
(k/offenes-koeln get-locations {:street "Marzellenstraße" :output "averages"})Get the nodes for "Aachener Straße"
(k/offenes-koeln get-locations {:street "Aachener Straße" :output "nodes"})Get all streets around 50,959/6,946.
(k/offenes-koeln get-street {:latitude "50.959" :longitude "6.946"})(k/offenes-koeln get-session {})(k/offenes-koeln get-terms {})Copyright © 2013 Florian Over
Distributed under the Eclipse Public License, the same as Clojure.
