synergia-jira-connector
Version:
Easy to use NodeJS wrapper for the Jira REST API.
148 lines (131 loc) • 6.52 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Source: api/groupUserPicker.js</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">Source: api/groupUserPicker.js</h1>
<section>
<article>
<pre class="prettyprint source linenums"><code>"use strict";
module.exports = GroupUserPickerClient;
/**
* Used to access Jira REST endpoints in '/rest/api/2/groupuserpicker'
* @param {JiraClient} jiraClient
* @constructor GroupUserPickerClient
*/
function GroupUserPickerClient(jiraClient) {
this.jiraClient = jiraClient;
/**
* Returns a list of users and groups matching query with highlighting. This resource cannot be accessed
* anonymously.
*
* @method findUsersAndGroups
* @memberOf GroupUserPickerClient#
* @param {Object} opts The request options to send to the Jira API.
* @param {string} opts.query A string used to search username, Name or e-mail address
* @param {number} [opts.maxResults] the maximum number of users to return (defaults to 50). The maximum allowed
* value is 1000. If you specify a value that is higher than this number, your search results will be
* truncated.
* @param {boolean} [opts.showAvatar] Whether to show the avatar
* @param {string} [opts.fieldId] The custom field id, if this request comes from a custom field, such as a user
* picker. Optional.
* @param {string} [opts.projectId] The list of project ids to further restrict the search This parameter can occur
* multiple times to pass in multiple project ids. Comma separated value is not supported. This parameter is
* only used when fieldId is present.
* @param {string} [opts.issueTypeId] The list of issue type ids to further restrict the search. This parameter can
* occur multiple times to pass in multiple issue type ids. Comma separated value is not supported. Special
* values such as -1 (all standard issue types), -2 (all subtask issue types) are supported. This parameter is
* only used when fieldId is present.
* @param callback Called when the search is completed.
*/
this.findUsersAndGroups = function (opts, callback) {
var options = {
uri: this.jiraClient.buildURL('/groupuserpicker'),
method: 'GET',
json: true,
followAllRedirects: true,
qs: {
query: opts.query,
maxResults: opts.maxResults,
showAvatar: opts.showAvatar,
fieldId: opts.fieldId,
projectId: opts.projectId,
issueTypeId: opts.issueTypeId
}
};
this.jiraClient.makeRequest(options, callback);
};
}</code></pre>
</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="IssueClient.html">IssueClient</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="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 Sep 22 2015
13:08:43 GMT-0500 (CDT)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"></script>
</body>
</html>