synergia-jira-connector
Version:
Easy to use NodeJS wrapper for the Jira REST API.
877 lines (468 loc) • 22.1 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: GroupClient</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: GroupClient</h1>
<section>
<header>
<h2>
GroupClient
</h2>
</header>
<article>
<div class="container-overview">
<h2>Constructor</h2>
<h4 class="name" id="GroupClient"><span class="type-signature"></span>new GroupClient<span
class="signature">(jiraClient)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Used to access Jira REST endpoints in '/rest/api/2/group'</p>
<p>These are considered experimental according to the Jira Docs, use at your own risk.</p>
</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>jiraClient</code></td>
<td class="type">
<span class="param-type"><a href="JiraClient.html">JiraClient</a></span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="api_group.js.html">api/group.js</a>, <a href="api_group.js.html#line5">line
5</a>
</li>
</ul>
</dd>
</dl>
</div>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="addUserToGroup"><span class="type-signature"></span>addUserToGroup<span
class="signature">(opts, callback)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Adds given user to a group. Returns the current state of the group.</p>
</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>opts</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>The request options sent to the Jira API</p>
<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>groupName</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>A name of requested group.</p></td>
</tr>
<tr>
<td class="name"><code>userName</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>The name of the user to add to the group.</p></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
</td>
<td class="description last"><p>Called when the user has been added to the group.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="api_group.js.html">api/group.js</a>, <a href="api_group.js.html#line73">line 73</a>
</li>
</ul>
</dd>
</dl>
<h4 class="name" id="createGroup"><span class="type-signature"></span>createGroup<span class="signature">(opts, callback)</span><span
class="type-signature"></span></h4>
<div class="description">
<p>Creates a group by given group parameter Returns REST representation for the requested group.</p>
</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>opts</code></td>
<td class="type">
</td>
<td class="description last"><p>The request options sent to jira</p>
<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>group</code></td>
<td class="type">
</td>
<td class="description last"><p>The group to create. See <a
href="https://docs.atlassian.com/jira/REST/latest/#d2e2011">https://docs.atlassian.com/jira/REST/latest/#d2e2011</a>
</p></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
</td>
<td class="description last"><p>Called when the group is created</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="api_group.js.html">api/group.js</a>, <a href="api_group.js.html#line16">line 16</a>
</li>
</ul>
</dd>
</dl>
<h4 class="name" id="deleteGroup"><span class="type-signature"></span>deleteGroup<span class="signature">(opts, callback)</span><span
class="type-signature"></span></h4>
<div class="description">
<p>Deletes a group by given group parameter. Returns no content</p>
</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>opts</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>The request options sent to the Jira API</p>
<h6>Properties</h6>
<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>groupName</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="description last"><p>A group to delete.</p></td>
</tr>
<tr>
<td class="name"><code>swapGroup</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last"><p>A group to transfer visibility restrictions of the group
that is being deleted</p></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
</td>
<td class="description last"><p>Called when the group has been deleted.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="api_group.js.html">api/group.js</a>, <a href="api_group.js.html#line125">line
125</a>
</li>
</ul>
</dd>
</dl>
<h4 class="name" id="getGroup"><span class="type-signature"></span>getGroup<span class="signature">(opts, callback)</span><span
class="type-signature"></span></h4>
<div class="description">
<p>Returns REST representation for the requested group. Allows to get list of active users belonging to
the
specified group and its subgroups if "users" expand option is provided. You can page
through users list by using
indexes in expand param. For example to get users from index 10 to index 15 use "users[10:15]"
expand value.
This will return 6 users (if there are at least 16 users in this group). Indexes are 0-based and
inclusive.</p>
</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>opts</code></td>
<td class="type">
</td>
<td class="description last"><p>The request options sent to the Jira API</p>
<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>groupName</code></td>
<td class="type">
</td>
<td class="description last"><p>A name of requested group.</p></td>
</tr>
<tr>
<td class="name"><code>expand</code></td>
<td class="type">
</td>
<td class="description last"><p>Array of fields to expand. Currently only available
expand is "users".</p></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
</td>
<td class="description last"><p>Called when the group is retrieved.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="api_group.js.html">api/group.js</a>, <a href="api_group.js.html#line37">line 37</a>
</li>
</ul>
</dd>
</dl>
<h4 class="name" id="removeUserFromGroup"><span class="type-signature"></span>removeUserFromGroup<span
class="signature">(opts, callback)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Removes given user from a group. Returns no content</p>
</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>opts</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>The request options sent to the Jira API</p>
<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>groupName</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>A name of requested group.</p></td>
</tr>
<tr>
<td class="name"><code>userName</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>The name of the user to add to the group.</p></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
</td>
<td class="description last"><p>Called when the user has been added to the group.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="api_group.js.html">api/group.js</a>, <a href="api_group.js.html#line100">line
100</a>
</li>
</ul>
</dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2>
<h3>Classes</h3>
<ul>
<li><a href="ApplicationPropertiesClient.html">ApplicationPropertiesClient</a></li>
<li><a href="AttachmentClient.html">AttachmentClient</a></li>
<li><a href="AuditingClient.html">AuditingClient</a></li>
<li><a href="AvatarClient.html">AvatarClient</a></li>
<li><a href="CommentClient.html">CommentClient</a></li>
<li><a href="ComponentClient.html">ComponentClient</a></li>
<li><a href="CustomFieldOptionClient.html">CustomFieldOptionClient</a></li>
<li><a href="DashboardClient.html">DashboardClient</a></li>
<li><a href="FieldClient.html">FieldClient</a></li>
<li><a href="FilterClient.html">FilterClient</a></li>
<li><a href="GroupClient.html">GroupClient</a></li>
<li><a href="GroupsClient.html">GroupsClient</a></li>
<li><a href="GroupUserPickerClient.html">GroupUserPickerClient</a></li>
<li><a href="IssueLinkClient.html">IssueLinkClient</a></li>
<li><a href="IssueLinkTypeClient.html">IssueLinkTypeClient</a></li>
<li><a href="IssueTypeClient.html">IssueTypeClient</a></li>
<li><a href="JiraClient.html">JiraClient</a></li>
<li><a href="JqlClient.html">JqlClient</a></li>
<li><a href="LicenseRoleClient.html">LicenseRoleClient</a></li>
<li><a href="LicenseValidatorClient.html">LicenseValidatorClient</a></li>
<li><a href="MyPermissionsClient.html">MyPermissionsClient</a></li>
<li><a href="MyPreferencesClient.html">MyPreferencesClient</a></li>
<li><a href="MyselfClient.html">MyselfClient</a></li>
<li><a href="PasswordClient.html">PasswordClient</a></li>
<li><a href="PriorityClient.html">PriorityClient</a></li>
<li><a href="ProjectCategoryClient.html">ProjectCategoryClient</a></li>
<li><a href="ProjectClient.html">ProjectClient</a></li>
<li><a href="ProjectValidateClient.html">ProjectValidateClient</a></li>
<li><a href="ReindexClient.html">ReindexClient</a></li>
<li><a href="ResolutionClient.html">ResolutionClient</a></li>
<li><a href="ScreensClient.html">ScreensClient</a></li>
<li><a href="SearchClient.html">SearchClient</a></li>
<li><a href="SecurityLevelClient.html">SecurityLevelClient</a></li>
<li><a href="ServerInfoClient.html">ServerInfoClient</a></li>
<li><a href="SettingsClient.html">SettingsClient</a></li>
<li><a href="StatusCategoryClient.html">StatusCategoryClient</a></li>
<li><a href="StatusClient.html">StatusClient</a></li>
<li><a href="UserClient.html">UserClient</a></li>
<li><a href="VersionClient.html">VersionClient</a></li>
<li><a href="WorkflowClient.html">WorkflowClient</a></li>
<li><a href="WorkflowSchemeClient.html">WorkflowSchemeClient</a></li>
</ul>
<h3>Namespaces</h3>
<ul>
<li><a href="OauthUtil.html">OauthUtil</a></li>
</ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha13</a> on Tue Oct 27 2015
13:43:13 GMT-0500 (CDT)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"></script>
</body>
</html>