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

1565 lines
16 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Global</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/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<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>
<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>
<h3 class="subsection-title">Methods</h3>
<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>
<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">Object</span>
</td>
<td class="description last">The data to send.
<h6>Properties</h6>
<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">String</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">String</span>
</td>
<td class="description last">Message text.</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<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#line149">line 149</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
- Encrypted string.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">String</span>
</dd>
</dl>
<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>
<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">String</span>
</td>
<td class="description last">Encrypted data.</td>
</tr>
</tbody>
</table>
<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#line98">line 98</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
- Decrypted string.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">String</span>
</dd>
</dl>
<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>
<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">String</span>
</td>
<td class="description last">Encrypted data.</td>
</tr>
</tbody>
</table>
<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#line113">line 113</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
- Decrypted JSON.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Object</span>
</dd>
</dl>
<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>
<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">String</span>
</td>
<td class="description last">Decrypted data.</td>
</tr>
</tbody>
</table>
<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#line83">line 83</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
- Encrypted string.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">String</span>
</dd>
</dl>
<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>
<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">String</span>
</td>
<td class="description last">The string to convert.</td>
</tr>
</tbody>
</table>
<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#line128">line 128</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
- The converted string.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">String</span>
</dd>
</dl>
<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>
<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">String</span>
</td>
<td class="description last">The string to check.</td>
</tr>
</tbody>
</table>
<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#line175">line 175</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Boolean</span>
</dd>
</dl>
<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>
<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">String</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">requestCallback</span>
</td>
<td class="description last">The callback that handles the response.</td>
</tr>
</tbody>
</table>
<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#line14">line 14</a>
</li></ul></dd>
</dl>
<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>
<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">Object</span>
</td>
<td class="description last">The data to send.
<h6>Properties</h6>
<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">String</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">String</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">requestCallback</span>
</td>
<td class="description last">The callback that handles the response.</td>
</tr>
</tbody>
</table>
<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#line50">line 50</a>
</li></ul></dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#_createPackage">_createPackage</a></li><li><a href="global.html#_decrypt">_decrypt</a></li><li><a href="global.html#_decryptJSON">_decryptJSON</a></li><li><a href="global.html#_encrypt">_encrypt</a></li><li><a href="global.html#_merger">_merger</a></li><li><a href="global.html#_verification">_verification</a></li><li><a href="global.html#connect">connect</a></li><li><a href="global.html#http">http</a></li><li><a href="global.html#send">send</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Mon May 29 2017 01:45:41 GMT+0300 (MSK)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>