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 SourceGetAsync(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 = null)
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 = null)
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 = null)
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>> | SearchResult |