Skip to content
Liberator HAL events resource
Clojure
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
src/liberator_hal_events_resource
test/liberator_hal_events_resource
.gitignore
CHANGELOG.md
LICENSE
README.md
project.clj

README.md

liberator-hal-events-resource

Clojars Project

A Clojure library for liberator to load and transform events to HAL resources.

This library uses Halboy for creating and rendering HAL resources.

[b-social/liberator-hal-events-resource "0.0.14"]

Usage

You'll need to provide 2 function

  • Event loader: how to load your events from their store. (for example your database)
  • Event transformer (how to map those events into HAL resources)
(defn events-resource-handler-for [{:keys [events-store] :as dependencies}]
  (events-resource dependencies default-page-size
    (partial db-events-loader events-store) #event-loader-function
    event-mapping/event->resource)) #event-transformer function

License

Copyright B-Social Limited © 2019

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

You can’t perform that action at this time.