'Unfurls' URLs approximately according to how Slack does it. See https://medium.com/slack-developer-blog/everything-you-ever-wanted-to-know-about-unfurling-but-were-afraid-to-ask-or-how-to-make-your-e64b4bb9254#.jhd6zdyjs for more info.


Keywords
clojure, clojure-library, unfurl, url-unfurling
License
Apache-2.0

Documentation

Build Status Open Issues License Dependencies Status

unfurl

This library implements "URL unfurling" approximately according to how Slack does it. See this blog post for more info.

Installation

unfurl is available as a Maven artifact from Clojars. The latest version is:

version

Trying it Out

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.

Usage

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.

Tested Versions

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

Developer Information

GitHub project

Bug Tracker

License

Copyright © 2016 Peter Monks

Distributed under the Apache License, Version 2.0.