harrogateclient
Version:
A simple node.js client for Kipr Harrogate on their Wallaby's.
903 lines (226 loc) • 9.78 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: User</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">Class: User</h1>
<section>
<header>
<h2><span class="attribs"><span class="type-signature"></span></span>User<span class="signature">(name, del, getProjects, addProject, deleteProject)</span><span class="type-signature"></span></h2>
</header>
<article>
<div class="container-overview">
<h4 class="name" id="User"><span class="type-signature"></span>new User<span class="signature">(name, del, getProjects, addProject, deleteProject)</span><span class="type-signature"></span></h4>
<div class="description">
Creates an User 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>name</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">name of the user</td>
</tr>
<tr>
<td class="name"><code>del</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">function to delete the user</td>
</tr>
<tr>
<td class="name"><code>getProjects</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">function to get the projects of the user</td>
</tr>
<tr>
<td class="name"><code>addProject</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">function to add a project</td>
</tr>
<tr>
<td class="name"><code>deleteProject</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">function to delete a project</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#line15">line 15</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Members</h3>
<h4 class="name" id="name"><span class="type-signature"></span>name<span class="type-signature"> :string</span></h4>
<div class="description">
name of the User
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<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#line25">line 25</a>
</li></ul></dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="addProject"><span class="type-signature"></span>addProject<span class="signature">(projectname)</span><span class="type-signature"> → {Promise.<<a href="Project.html">Project</a>, error>}</span></h4>
<div class="description">
Adds a project.
</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>projectname</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">name of the new project</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#line47">line 47</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<<a href="Project.html">Project</a>, error></span>
</dd>
</dl>
<h4 class="name" id="delete"><span class="type-signature"></span>delete<span class="signature">()</span><span class="type-signature"> → {Promise.<void, error>}</span></h4>
<div class="description">
Deletes the user.
</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#line32">line 32</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<void, error></span>
</dd>
</dl>
<h4 class="name" id="deleteProject"><span class="type-signature"></span>deleteProject<span class="signature">(projectname)</span><span class="type-signature"> → {Promise.<void, error>}</span></h4>
<div class="description">
Deletes a project.
</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>projectname</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">name of the project</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#line55">line 55</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<void, error></span>
</dd>
</dl>
<h4 class="name" id="getProjects"><span class="type-signature"></span>getProjects<span class="signature">()</span><span class="type-signature"> → {Promise.<Array.<<a href="Project.html">Project</a>>, error>}</span></h4>
<div class="description">
Get the projects of the user.
</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#line39">line 39</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<Array.<<a href="Project.html">Project</a>>, error></span>
</dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="File.html">File</a></li><li><a href="HarrogateClient.html">HarrogateClient</a></li><li><a href="Project.html">Project</a></li><li><a href="ProjectInfo.html">ProjectInfo</a></li><li><a href="User.html">User</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Fri Feb 23 2018 14:24:20 GMT+0100 (Mitteleuropäische Zeit)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>