0
mirror of https://github.com/valentineus/iii-client.git synced 2025-04-28 01:41:25 +03:00
iii-client/docs/global.html

1644 lines
19 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Global - Documentation</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="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
<div class="navicon"></div>
</label>
<label for="nav-trigger" class="overlay"></label>
<nav>
<li class="nav-link nav-home-link"><a href="index.html">Home</a></li><li class="nav-heading"><a href="global.html">Globals</a></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#_createPackage">_createPackage</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#_decrypt">_decrypt</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#_decryptJSON">_decryptJSON</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#_encrypt">_encrypt</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#_merger">_merger</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#_verification">_verification</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#connect">connect</a></span></li><li class="nav-item"><span class="nav-item-type type-member">M</span><span class="nav-item-name"><a href="global.html#http">http</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#send">send</a></span></li>
</nav>
<div id="main">
<h1 class="page-title">Global</h1>
<section>
<header>
<h2>
</h2>
</header>
<article>
<div class="container-overview">
<dl class="details">
</dl>
</div>
<h3 class="subsection-title">Members</h3>
<div class="section-members">
<h4 class="name" id="http"><span class="type-signature"></span>http<span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li><a href="mailto:info@valentineus.link">Valentin Popov</a></li>
</ul>
</dd>
<dt class="tag-license">License:</dt>
<dd class="tag-license"><ul class="dummy"><li>See LICENSE.md file included in this distribution.</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line7">line 7</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Methods</h3>
<div class="section-method">
<h4 class="name" id="_createPackage"><span class="type-signature"></span>_createPackage<span class="signature">(raw)</span><span class="type-signature"> &rarr; {String}</span></h4>
<div class="description">
Creates an encrypted package to send.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line140">line 140</a>
</li></ul></dd>
</dl>
<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>raw</code></td>
<td class="type">
<span class="param-type"><code>Object</code></span>
</td>
<td class="description last">
The data to send.
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>cuid</code></td>
<td class="type">
<span class="param-type"><code>String</code></span>
</td>
<td class="description last">
Session identifier.
</td>
</tr>
<tr>
<td class="name"><code>text</code></td>
<td class="type">
<span class="param-type"><code>String</code></span>
</td>
<td class="description last">
Message text.
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<div class="section-returns">
<h5>Returns:</h5>
<dl class="param-type">
<dt>
Type:
</dt>
<dd>
<span class="param-type"><code>String</code></span>
</dd>
</dl>
<div class="param-desc">
- Encrypted string.
</div>
</div>
</div>
<div class="section-method">
<h4 class="name" id="_decrypt"><span class="type-signature"></span>_decrypt<span class="signature">(raw)</span><span class="type-signature"> &rarr; {String}</span></h4>
<div class="description">
Decrypts the incoming data.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line92">line 92</a>
</li></ul></dd>
</dl>
<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>raw</code></td>
<td class="type">
<span class="param-type"><code>String</code></span>
</td>
<td class="description last">
Encrypted data.
</td>
</tr>
</tbody>
</table>
<div class="section-returns">
<h5>Returns:</h5>
<dl class="param-type">
<dt>
Type:
</dt>
<dd>
<span class="param-type"><code>String</code></span>
</dd>
</dl>
<div class="param-desc">
- Decrypted string.
</div>
</div>
</div>
<div class="section-method">
<h4 class="name" id="_decryptJSON"><span class="type-signature"></span>_decryptJSON<span class="signature">(raw)</span><span class="type-signature"> &rarr; {Object}</span></h4>
<div class="description">
Decrypts an encrypted JSON object.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line106">line 106</a>
</li></ul></dd>
</dl>
<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>raw</code></td>
<td class="type">
<span class="param-type"><code>String</code></span>
</td>
<td class="description last">
Encrypted data.
</td>
</tr>
</tbody>
</table>
<div class="section-returns">
<h5>Returns:</h5>
<dl class="param-type">
<dt>
Type:
</dt>
<dd>
<span class="param-type"><code>Object</code></span>
</dd>
</dl>
<div class="param-desc">
- Decrypted JSON.
</div>
</div>
</div>
<div class="section-method">
<h4 class="name" id="_encrypt"><span class="type-signature"></span>_encrypt<span class="signature">(raw)</span><span class="type-signature"> &rarr; {String}</span></h4>
<div class="description">
Encrypts the incoming data.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line78">line 78</a>
</li></ul></dd>
</dl>
<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>raw</code></td>
<td class="type">
<span class="param-type"><code>String</code></span>
</td>
<td class="description last">
Decrypted data.
</td>
</tr>
</tbody>
</table>
<div class="section-returns">
<h5>Returns:</h5>
<dl class="param-type">
<dt>
Type:
</dt>
<dd>
<span class="param-type"><code>String</code></span>
</dd>
</dl>
<div class="param-desc">
- Encrypted string.
</div>
</div>
</div>
<div class="section-method">
<h4 class="name" id="_merger"><span class="type-signature"></span>_merger<span class="signature">(raw)</span><span class="type-signature"> &rarr; {String}</span></h4>
<div class="description">
Merge and convert a string.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line120">line 120</a>
</li></ul></dd>
</dl>
<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>raw</code></td>
<td class="type">
<span class="param-type"><code>String</code></span>
</td>
<td class="description last">
The string to convert.
</td>
</tr>
</tbody>
</table>
<div class="section-returns">
<h5>Returns:</h5>
<dl class="param-type">
<dt>
Type:
</dt>
<dd>
<span class="param-type"><code>String</code></span>
</dd>
</dl>
<div class="param-desc">
- The converted string.
</div>
</div>
</div>
<div class="section-method">
<h4 class="name" id="_verification"><span class="type-signature"></span>_verification<span class="signature">(data)</span><span class="type-signature"> &rarr; {Boolean}</span></h4>
<div class="description">
Validation UUID format string.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line165">line 165</a>
</li></ul></dd>
</dl>
<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>data</code></td>
<td class="type">
<span class="param-type"><code>String</code></span>
</td>
<td class="description last">
The string to check.
</td>
</tr>
</tbody>
</table>
<div class="section-returns">
<h5>Returns:</h5>
<dl class="param-type">
<dt>
Type:
</dt>
<dd>
<span class="param-type"><code>Boolean</code></span>
</dd>
</dl>
</div>
</div>
<div class="section-method">
<h4 class="name" id="connect"><span class="type-signature"></span>connect<span class="signature">(uuid, callback)</span><span class="type-signature"></span></h4>
<div class="description">
Connects to the server and returns the connection data.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line15">line 15</a>
</li></ul></dd>
</dl>
<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>uuid</code></td>
<td class="type">
<span class="param-type"><code>String</code></span>
</td>
<td class="description last">
The bot UUID.
</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type"><code>requestCallback</code></span>
</td>
<td class="description last">
The callback that handles the response.
</td>
</tr>
</tbody>
</table>
</div>
<div class="section-method">
<h4 class="name" id="send"><span class="type-signature"></span>send<span class="signature">(raw, callback)</span><span class="type-signature"></span></h4>
<div class="description">
Send a message to the server and return a response.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line48">line 48</a>
</li></ul></dd>
</dl>
<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>raw</code></td>
<td class="type">
<span class="param-type"><code>Object</code></span>
</td>
<td class="description last">
The data to send.
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>cuid</code></td>
<td class="type">
<span class="param-type"><code>String</code></span>
</td>
<td class="description last">
Session identifier.
</td>
</tr>
<tr>
<td class="name"><code>text</code></td>
<td class="type">
<span class="param-type"><code>String</code></span>
</td>
<td class="description last">
Message text.
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type"><code>requestCallback</code></span>
</td>
<td class="description last">
The callback that handles the response.
</td>
</tr>
</tbody>
</table>
</div>
</article>
</section>
</div>
<br class="clear">
<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Mon May 29 2017 07:00:49 GMT+0300 (MSK) using the Minami theme.
</footer>
<script>prettyPrint();</script>
<script src="scripts/linenumber.js"></script>
</body>
</html>