-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
24 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<!DOCTYPE html PUBLIC "" | ||
""> | ||
|
||
<html><head><meta charset="UTF-8" /><title> </title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name"></span> <span class="project-version"></span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 current"><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1 "><a href="unfurl.api.html"><div class="inner"><span>unfurl.api</span></div></a></li></ul></div><div class="namespace-index" id="content"><h1><span class="project-title"><span class="project-name"></span> <span class="project-version"></span></span></h1><h2>Namespaces</h2><div class="namespace"><h3><a href="unfurl.api.html">unfurl.api</a></h3><div class="doc"><pre class="plaintext"></pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="unfurl.api.html#var-unfurl">unfurl</a> </li></ul></div></div></div></body></html> | ||
<html><head><meta charset="UTF-8" /><title> </title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name"></span> <span class="project-version"></span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 current"><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1 "><a href="unfurl.api.html"><div class="inner"><span>unfurl.api</span></div></a></li></ul></div><div class="namespace-index" id="content"><h1><span class="project-title"><span class="project-name"></span> <span class="project-version"></span></span></h1><h2>Namespaces</h2><div class="namespace"><h3><a href="unfurl.api.html">unfurl.api</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="unfurl.api.html#var-unfurl">unfurl</a> </li></ul></div></div></div></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,26 @@ | ||
<!DOCTYPE html PUBLIC "" | ||
""> | ||
|
||
<html><head><meta charset="UTF-8" /><title>unfurl.api documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name"></span> <span class="project-version"></span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1 current"><a href="unfurl.api.html"><div class="inner"><span>unfurl.api</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="unfurl.api.html#var-unfurl"><div class="inner"><span>unfurl</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">unfurl.api</h1><div class="doc"><pre class="plaintext"></pre></div><div class="public anchor" id="var-unfurl"><h3>unfurl</h3><div class="usage"><code>(unfurl url & {:keys [follow-redirects timeout-ms user-agent max-content-length proxy-host proxy-port], :or {follow-redirects true, timeout-ms 1000, user-agent "unfurl", max-content-length 16384, proxy-host nil, proxy-port nil}})</code></div><div class="doc"><pre class="plaintext">Unfurls the given url, throwing an exception if the url is invalid, returning | ||
nil if the given url is nil or not supported, or a map containing some or all | ||
of the following keys (none of which are mandatory): | ||
|
||
{ | ||
:url - The url of the resource, according to the server | ||
:title - The title of the given url | ||
:description - The description of the given url | ||
:preview-url - The url of a preview image for the given url | ||
} | ||
|
||
Options are provided as key/value pairs, with any/all of the following keys: | ||
|
||
{ | ||
:follow-redirects (default: true) - whether to follow 30x redirects | ||
:timeout-ms (default: 1000) - timeout in ms (used for both the socket and connect timeouts) | ||
:user-agent (default: "unfurl") - user agent string to send in the HTTP request | ||
:max-content-length (default: 16384) - maximum length (in bytes) of content to retrieve (using HTTP range requests) | ||
:proxy-host (default: nil) - HTTP proxy hostname | ||
:proxy-port (default: nil) - HTTP proxy port | ||
} | ||
|
||
Thrown exceptions will usually be an ExceptionInfo with the ex-data containing: | ||
|
||
{ | ||
:request - the details of the HTTP request that was attempted | ||
:response - the details of the HTTP response that was received (comes directly from clj-http) | ||
}</pre></div><div class="src-link"><a href="https://github.com/pmonks/unfurl/blob/main/src/unfurl/api.clj#L98">view source</a></div></div></div></body></html> | ||
<html><head><meta charset="UTF-8" /><title>unfurl.api documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name"></span> <span class="project-version"></span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1 current"><a href="unfurl.api.html"><div class="inner"><span>unfurl.api</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="unfurl.api.html#var-unfurl"><div class="inner"><span>unfurl</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">unfurl.api</h1><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-unfurl"><h3>unfurl</h3><div class="usage"><code>(unfurl url & {:keys [follow-redirects timeout-ms user-agent max-content-length proxy-host proxy-port http-headers], :or {follow-redirects true, timeout-ms 1000, user-agent "https://github.com/pmonks/unfurl", max-content-length 16384, proxy-host nil, proxy-port nil, http-headers nil}})</code></div><div class="doc"><div class="markdown"><p>Unfurls the given <code>url</code> , returning <code>nil</code> if <code>url</code> is <code>nil</code> or not supported, or a map containing some or all of the following keys (all of which are optional):</p> | ||
<ul> | ||
<li><code>:url</code> (<code>String</code>) The url of the resource, according to the server.</li> | ||
<li><code>:title</code> (<code>String</code>) The title of the given url.</li> | ||
<li><code>:description</code> (<code>String</code>) A brief textual description of the given url.</li> | ||
<li><code>:preview-url</code> (<code>String</code>) The url of a preview image for the given url.</li> | ||
</ul> | ||
<p>Options are:</p> | ||
<ul> | ||
<li><code>:follow-redirects</code> (<code>boolean</code>, default <code>true</code>): Whether to follow 30x redirects.</li> | ||
<li><code>:timeout-ms</code> (<code>long</code>, default <code>1000</code>) Timeout in ms (used for both the socket and connect timeouts).</li> | ||
<li><code>:user-agent</code> (<code>String</code>, default <code>"https://github.com/pmonks/unfurl"</code>) User agent string to send in the HTTP request. This should be either a browser identification string, an email address, or a URL, as some servers will reject requests with User Agent values that aren’t in one of these domains.</li> | ||
<li><code>:max-content-length</code> (<code>long</code>, default <code>16384</code>) Maximum length (in bytes) of content to retrieve, using HTTP range requests (the entire content does not normally need to be retrieved in order to get the metadata <code>unfurl</code> uses).</li> | ||
<li><code>:proxy-host</code> (<code>String</code>, default <code>nil</code>) HTTP proxy hostname.</li> | ||
<li><code>:proxy-port</code> (<code>long</code>, default <code>nil</code>) HTTP proxy port.</li> | ||
<li><code>:http-headers</code> (a map with <code>String</code> keys and <code>String</code> values, default <code>nil</code>) A map of any other HTTP request headers you might want <code>unfurl</code> to include in the requests it makes.</li> | ||
</ul> | ||
<p>Throws on I/O errors, usually an ExceptionInfo with the <code>ex-data</code> containing:</p> | ||
<ul> | ||
<li><code>:request</code> (a map with <code>String</code> keys and <code>String</code> values) Contains the details of the HTTP request that was attempted.</li> | ||
<li><code>:response</code> (a map with <code>String</code> keys and <code>String</code> values) Contains the details of the HTTP response that was received (directly from <code>clj-http</code>).</li> | ||
</ul> | ||
</div></div><div class="src-link"><a href="https://github.com/pmonks/unfurl/blob/release/src/unfurl/api.clj#L89">view source</a></div></div></div></body></html> |