This library implements "URL unfurling" approximately according to how Slack does it. See this blog post for more info.
unfurl is available as a Maven artifact from Clojars. The latest version is:
If you prefer to kick the library's tyres before creating a project, you can use the lein try
plugin:
$ lein try org.clojars.pmonks/unfurl
or (as of v0.10.0), if you have installed the Clojure CLI tools:
$ clj -Sdeps '{:deps {org.clojars.pmonks/unfurl {:mvn/version "#.#.#"}}}' # Where #.#.# is replaced with an actual version number >= 0.10.0
Either way, you will be dropped in a REPL with the library downloaded and ready for use.
The functionality is provided by the unfurl.api
namespace.
Require it in the REPL:
(require '[unfurl.api :as uf] :reload-all)
Require it in your application:
(ns my-app.core
(:require [unfurl.api :as uf]))
The library provides a single function - unfurl
. The API documentation has full details, and the unit tests provide some example usages.
unfurl is tested on:
JVM v1.6 | JVM v1.7 | JVM v1.8 | JVM v9 | JVM v10 | JVM v11 | |
---|---|---|---|---|---|---|
Clojure 1.6.0 | ❌1,2 | ❌1 | ❌1 | ❌1 | ❌1 | ❌1 |
Clojure 1.7.0 | ❌2 | ✅ | ✅ | ✅ | ✅ | ✅ |
Clojure 1.8.0 | ❌2 | ✅ | ✅ | ✅ | ✅ | ✅ |
Clojure 1.9.0 | ❌2 | ✅ | ✅ | ✅ | ✅ | ✅ |
Clojure 1.10.0 (snapshot) | ❌2,3 | ❌3 | ✅ | ✅ | ✅ | ✅ |
1 The version of hickory
used by this library only supports Clojure v1.7.0 and up
2 Leiningen v2.8 only supports JVM v1.7 and up
3 Clojure v1.10 only supports JVM v1.8 and up
Copyright © 2016 Peter Monks
Distributed under the Apache License, Version 2.0.
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close