Class UserExtensions
This holds all the user related extension methods
Inheritance
Inherited Members
Namespace: Dapplo.Jira
Assembly: Dapplo.Jira.dll
Syntax
public static class UserExtensions
Methods
| Improve this Doc View SourceGetAssignableUsersAsync(IUserDomain, String, String, String, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, CancellationToken)
Retrieve the assignable users for the specified project or issue See here
Declaration
public static Task<IEnumerable<User>> GetAssignableUsersAsync(this IUserDomain jiraClient, string username = null, string projectKey = null, string issueKey = null, int? startAt = default(int? ), int? maxResults = default(int? ), int? actionDescriptorId = default(int? ), CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IUserDomain | jiraClient | IProjectDomain |
System.String | username | optional string with a pattern |
System.String | projectKey | optional string with the key of the project |
System.String | issueKey | optional string with the key of the issue |
System.Nullable<System.Int32> | startAt | optional int where to start returning the results |
System.Nullable<System.Int32> | maxResults | optional int with the max of the result |
System.Nullable<System.Int32> | actionDescriptorId | optional int, not documented what this does |
System.Threading.CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<User>> | IEnumerable with User |
GetAsync(IUserDomain, String, CancellationToken)
Get user information See: https://docs.atlassian.com/jira/REST/latest/#d2e5339
Declaration
public static Task<User> GetAsync(this IUserDomain jiraClient, string username, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IUserDomain | jiraClient | IWorkDomain to bind the extension method to |
System.String | username | |
System.Threading.CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<User> | User |
GetMyselfAsync(IUserDomain, CancellationToken)
Get currrent user information See: https://docs.atlassian.com/jira/REST/latest/#d2e4253
Declaration
public static Task<User> GetMyselfAsync(this IUserDomain jiraClient, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IUserDomain | jiraClient | IWorkDomain to bind the extension method to |
System.Threading.CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<User> | User |
SearchAsync(IUserDomain, String, Boolean, Boolean, Int32, Int32, CancellationToken)
Returns a list of users that match the search string. This resource cannot be accessed anonymously. See: https://docs.atlassian.com/jira/REST/latest/#api/2/user-findUsers
Declaration
public static Task<IList<User>> SearchAsync(this IUserDomain jiraClient, string query, bool includeActive = true, bool includeInactive = false, int startAt = 0, int maxResults = 20, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IUserDomain | jiraClient | IWorkDomain to bind the extension method to |
System.String | query | A query string used to search username, name or e-mail address |
System.Boolean | includeActive | If true, then active users are included in the results (default true) |
System.Boolean | includeInactive | If true, then inactive users are included in the results (default false) |
System.Int32 | startAt | |
System.Int32 | maxResults | Maximum number of results returned, default is 20 |
System.Threading.CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IList<User>> | SearchResults |