Plugin system inspired by Jellyfin's IPlugin and Mopidy's frontend
extensions. A plugin is a plain map with at minimum a :name and
:install function:
(def my-scrobbler
{:name "lastfm-scrobbler"
:version "1.0.0"
:description "Scrobble plays to Last.fm"
:install (fn [{:keys [client query events]}]
(events/on client :track-changed
(fn [t] (submit-scrobble t))))
:uninstall (fn [] (disconnect-lastfm))})
Install with rockbox.core/use-plugin. The :install fn receives a
context map: {:client client :query query-fn :events events-ns}.
Plugin system inspired by Jellyfin's IPlugin and Mopidy's frontend
extensions. A plugin is a plain map with at minimum a `:name` and
`:install` function:
(def my-scrobbler
{:name "lastfm-scrobbler"
:version "1.0.0"
:description "Scrobble plays to Last.fm"
:install (fn [{:keys [client query events]}]
(events/on client :track-changed
(fn [t] (submit-scrobble t))))
:uninstall (fn [] (disconnect-lastfm))})
Install with `rockbox.core/use-plugin`. The `:install` fn receives a
context map: `{:client client :query query-fn :events events-ns}`.(install client plugin)Install plugin into client. Throws if a plugin with the same :name
is already installed.
Install `plugin` into `client`. Throws if a plugin with the same `:name` is already installed.
(installed client)List installed plugins for client.
List installed plugins for `client`.
(uninstall client plugin-name)Uninstall a plugin by :name. Returns the client. Idempotent.
Uninstall a plugin by `:name`. Returns the client. Idempotent.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |