lunr-elastic-search
Version:
Uses Lunr.js to index and search the knowledge base.
783 lines (218 loc) • 13.1 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>Namespace: freshdesk | lunr-elastic-search</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/bootstrap.min.css">
<link type="text/css" rel="stylesheet" href="styles/prettify-jsdoc.css">
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/tui-doc.css">
</head>
<body>
<nav class="lnb" id="lnb">
<div class="logo" style="">
<img src="img/toast-ui.png" width="100%" height="100%">
</div>
<div class="title">
<h1><a href="index.html" class="link">lunr-elastic-search</a></h1>
</div>
<div class="search-container" id="search-container">
<input type="text" placeholder="Search">
<ul></ul>
</div>
<div class="lnb-api hidden"><h3>Classes</h3><ul><li><a href="LunrSearch.html">LunrSearch</a><button type="button" class="hidden toggle-subnav btn btn-link"> <span class="glyphicon glyphicon-plus"></span></button><div class="hidden" id="LunrSearch_sub"><div class="member-type">Members</div><ul class="inner"><li><a href="LunrSearch.html#.VERSION">VERSION</a></li><li><a href="LunrSearch.html#builder">builder</a></li><li><a href="LunrSearch.html#docs">docs</a></li><li><a href="LunrSearch.html#domain">domain</a></li><li><a href="LunrSearch.html#editDistance">editDistance</a></li><li><a href="LunrSearch.html#index">index</a></li><li><a href="LunrSearch.html#pass">pass</a></li><li><a href="LunrSearch.html#plugins">plugins</a></li><li><a href="LunrSearch.html#user">user</a></li></ul><div class="member-type">Methods</div><ul class="inner"><li><a href="LunrSearch.html#.buildIndex">buildIndex</a></li><li><a href="LunrSearch.html#.exportIndex">exportIndex</a></li><li><a href="LunrSearch.html#.fetch">fetch</a></li><li><a href="LunrSearch.html#.getIndex">getIndex</a></li><li><a href="LunrSearch.html#.importIndex">importIndex</a></li><li><a href="LunrSearch.html#.isSupported">isSupported</a></li><li><a href="LunrSearch.html#.postIndex">postIndex</a></li><li><a href="LunrSearch.html#.search">search</a></li><li><a href="LunrSearch.html#buildIndex">buildIndex</a></li><li><a href="LunrSearch.html#exportIndex">exportIndex</a></li><li><a href="LunrSearch.html#fetch">fetch</a></li><li><a href="LunrSearch.html#getIndex">getIndex</a></li><li><a href="LunrSearch.html#importIndex">importIndex</a></li><li><a href="LunrSearch.html#postIndex">postIndex</a></li><li><a href="LunrSearch.html#search">search</a></li></ul><div class="member-type">Typedef</div><ul class="inner"><li><a href="LunrSearch.html#.Plugin">Plugin</a></li><li><a href="LunrSearch.html#.Result">Result</a></li></ul></div></li></ul></div><div class="lnb-api hidden"><h3>Namespaces</h3><ul><li><a href="plugin.html">plugin</a><button type="button" class="hidden toggle-subnav btn btn-link"> <span class="glyphicon glyphicon-plus"></span></button><div class="hidden" id="plugin_sub"></div></li><li><a href="plugin.freshdesk.html">plugin.freshdesk</a><button type="button" class="hidden toggle-subnav btn btn-link"> <span class="glyphicon glyphicon-plus"></span></button><div class="hidden" id="plugin.freshdesk_sub"><div class="member-type">Methods</div><ul class="inner"><li><a href="plugin.freshdesk.html#.fetch">fetch</a></li><li><a href="plugin.freshdesk.html#.isSupported">isSupported</a></li><li><a href="plugin.freshdesk.html#.plugin">plugin</a></li><li><a href="plugin.freshdesk.html#.process">process</a></li></ul></div></li><li><a href="util.html">util</a><button type="button" class="hidden toggle-subnav btn btn-link"> <span class="glyphicon glyphicon-plus"></span></button><div class="hidden" id="util_sub"><div class="member-type">Methods</div><ul class="inner"><li><a href="util.html#.definedFunction">definedFunction</a></li></ul></div></li></ul></div>
</nav>
<div id="resizer"></div>
<div class="main" id="main">
<section>
<header>
<h2>
<span class="ancestors"><a href="plugin.html">plugin</a>.</span>freshdesk</h2>
</header>
<article>
<div class="container-overview">
<div class="description"><p>Contains functions for interacting with the freshdesk API and processing those responses.</p></div>
<dl class="details">
</dl>
</div>
<h3 class="subsection-title">Methods</h3>
<dl>
<dt>
<h4 class="name" id=".fetch">
<span class="type-signature"><span class="icon green">async</span>, <span class="icon green">static</span> </span>fetch<span class="signature">(domain, user, pass)</span><span class="type-signature"> → {Array.<object>}</span>
<div class="container-source members">
<code><a href="plugin_freshdesk.js.html">plugin/freshdesk.js</a></code>,
<code><a href="plugin_freshdesk.js.html#line28">line 28</a></code>
</div>
</h4>
</dt>
<dd>
<div class="description">
<p>Fetches all the solution articles and forum posts from the designated source.</p>
</div>
<div class="container-params">
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>domain</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>the domain of the API to make the request to</p></td>
</tr>
<tr>
<td class="name"><code>user</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>the username for the API</p></td>
</tr>
<tr>
<td class="name"><code>pass</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>the password for the API</p></td>
</tr>
</tbody>
</table>
</div>
<div class="container-returns">
<h5>Returns:</h5>
<span class="param-type">Array.<object></span>
- <p>a list of processed solution articles, forum topics, and forum comments</p>
</div>
<dl class="details">
</dl>
</dd>
<dt>
<h4 class="name" id=".isSupported">
<span class="type-signature"><span class="icon green">static</span> </span>isSupported<span class="signature">()</span><span class="type-signature"> → {Boolean}</span>
<div class="container-source members">
<code><a href="plugin_freshdesk.js.html">plugin/freshdesk.js</a></code>,
<code><a href="plugin_freshdesk.js.html#line132">line 132</a></code>
</div>
</h4>
</dt>
<dd>
<div class="description">
<p>Checks to see if certain functions are defined.</p>
</div>
<div class="container-returns">
<h5>Returns:</h5>
<span class="param-type">Boolean</span>
</div>
<dl class="details">
</dl>
</dd>
<dt>
<h4 class="name" id=".plugin">
<span class="type-signature"><span class="icon green">static</span> </span>plugin<span class="signature">()</span><span class="type-signature"> → {void}</span>
<div class="container-source members">
<code><a href="plugin_freshdesk.js.html">plugin/freshdesk.js</a></code>,
<code><a href="plugin_freshdesk.js.html#line14">line 14</a></code>
</div>
</h4>
</dt>
<dd>
<div class="description">
<p>The lunr.js builder plugin.
Meant to be used like <code>builder.use(plugin)</code></p>
</div>
<div class="container-returns">
<h5>Returns:</h5>
<span class="param-type">void</span>
</div>
<dl class="details">
</dl>
</dd>
<dt>
<h4 class="name" id=".process">
<span class="type-signature"><span class="icon green">static</span> </span>process<span class="signature">(doc, source<span class="signature-attributes">nullable</span>)</span><span class="type-signature"> → {object}</span>
<div class="container-source members">
<code><a href="plugin_freshdesk.js.html">plugin/freshdesk.js</a></code>,
<code><a href="plugin_freshdesk.js.html#line112">line 112</a></code>
</div>
</h4>
</dt>
<dd>
<div class="description">
<p>Modify the documents so that they can be indexed correctly.</p>
</div>
<div class="container-params">
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>doc</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="attributes">
</td>
<td class="description last"><p>the document to be processed</p></td>
</tr>
<tr>
<td class="name"><code>source</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
<nullable><br>
</td>
<td class="description last"><p>the source of the document</p></td>
</tr>
</tbody>
</table>
</div>
<div class="container-returns">
<h5>Returns:</h5>
<span class="param-type">object</span>
- <p>the processed document</p>
</div>
<dl class="details">
</dl>
</dd>
</dl>
</article>
</section>
</div>
<footer>
<img class="logo" src="img/toast-ui.png" style="">
<div class="footer-text">made this awesome JSDoc theme!</div>
</footer>
<script>prettyPrint();</script>
<script src="scripts/jquery.min.js"></script>
<script src="scripts/tui-doc.js"></script>
<script src="scripts/linenumber.js"></script>
<script>
var id = 'plugin.freshdesk_sub'.replace(/"/g, '_');
var selectedApi = document.getElementById(id); // do not use jquery selector
var $selectedApi = $(selectedApi);
$selectedApi.removeClass('hidden');
$selectedApi.parent().find('.glyphicon').removeClass('glyphicon-plus').addClass('glyphicon-minus');
showLnbApi();
</script>
</body>
</html>