Class UserDomain
All user related functionality
Inheritance
Inherited Members
Namespace: Dapplo.Confluence
Assembly: Dapplo.Confluence.dll
Syntax
public static class UserDomain
Methods
| Improve this Doc View SourceAddContentWatcher(IUserDomain, Int64, IUserIdentifier, CancellationToken)
Add the user to the list of users watching the specified content See: https://developer.atlassian.com/cloud/confluence/rest/#api-api-user-watch-content-contentId-post
Declaration
public static async Task AddContentWatcher(this IUserDomain confluenceClient, long contentId, IUserIdentifier userIdentifier = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
IUserDomain | confluenceClient | IUserDomain to bind the extension method to |
System.Int64 | contentId | long with the ID for the content |
IUserIdentifier | userIdentifier | IUserIdentifier for the user (account id), null for the current user |
CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
Task |
AddLabelWatcher(IUserDomain, String, IUserIdentifier, CancellationToken)
Add the user to the list of users watching the specified label See: https://developer.atlassian.com/cloud/confluence/rest/#api-api-user-watch-label-labelName-post
Declaration
public static async Task AddLabelWatcher(this IUserDomain confluenceClient, string label, IUserIdentifier userIdentifier = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
IUserDomain | confluenceClient | IUserDomain to bind the extension method to |
System.String | label | string with the label |
IUserIdentifier | userIdentifier | IUserIdentifier for the user (account id), null for the current user |
CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
Task |
AddSpaceWatcher(IUserDomain, String, IUserIdentifier, CancellationToken)
Add the user to the list of users watching the specified space See: https://developer.atlassian.com/cloud/confluence/rest/#api-api-user-watch-space-spaceKey-get
Declaration
public static async Task AddSpaceWatcher(this IUserDomain confluenceClient, string spaceKey, IUserIdentifier userIdentifier = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
IUserDomain | confluenceClient | IUserDomain to bind the extension method to |
System.String | spaceKey | string with the space key |
IUserIdentifier | userIdentifier | IUserIdentifier for the user (account id), null for the current user |
CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
Task |
GetAnonymousUserAsync(IUserDomain, CancellationToken)
Get Anonymous user information, introduced with 6.6 See: https://docs.atlassian.com/confluence/REST/latest/#user-getAnonymous
Declaration
public static async Task<User> GetAnonymousUserAsync(this IUserDomain confluenceClient, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
IUserDomain | confluenceClient | IUserDomain to bind the extension method to |
CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
Task<User> | User |
GetCurrentUserAsync(IUserDomain, CancellationToken)
Get current user information, introduced with 6.6 See: https://docs.atlassian.com/confluence/REST/latest/#user-getCurrent
Declaration
public static async Task<User> GetCurrentUserAsync(this IUserDomain confluenceClient, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
IUserDomain | confluenceClient | IUserDomain to bind the extension method to |
CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
Task<User> | User |
GetGroupMembershipsAsync(IUserDomain, IUserIdentifier, PagingInformation, CancellationToken)
Get groups for the specified user, introduced with 6.6 See: https://developer.atlassian.com/cloud/confluence/rest/#api-api-user-memberof-get
Declaration
public static async Task<IList<Group>> GetGroupMembershipsAsync(this IUserDomain confluenceClient, IUserIdentifier userIdentifier, PagingInformation pagingInformation = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
IUserDomain | confluenceClient | IUserDomain to bind the extension method to |
IUserIdentifier | userIdentifier | IUserIdentifier |
PagingInformation | pagingInformation | PagingInformation |
CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
Task<IList<Group>> | List with Groups |
GetUserAsync(IUserDomain, IUserIdentifier, CancellationToken)
Get user information, introduced with 6.6 See: https://docs.atlassian.com/confluence/REST/latest/#user-getUser
Declaration
public static async Task<User> GetUserAsync(this IUserDomain confluenceClient, IUserIdentifier userIdentifier, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
IUserDomain | confluenceClient | IUserDomain to bind the extension method to |
IUserIdentifier | userIdentifier | IUserIdentifier |
CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
Task<User> | User |
GetUserAsync(IUserDomain, String, CancellationToken)
Get user information, introduced with 6.6 See: https://docs.atlassian.com/confluence/REST/latest/#user-getUser
Declaration
public static async Task<User> GetUserAsync(this IUserDomain confluenceClient, string username, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
IUserDomain | confluenceClient | IUserDomain to bind the extension method to |
System.String | username | string with username |
CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
Task<User> | User |
IsContentWatcher(IUserDomain, Int64, IUserIdentifier, CancellationToken)
Check if the user is watching the specified content See: https://developer.atlassian.com/cloud/confluence/rest/#api-api-user-watch-content-contentId-get
Declaration
public static async Task<bool> IsContentWatcher(this IUserDomain confluenceClient, long contentId, IUserIdentifier userIdentifier = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
IUserDomain | confluenceClient | IUserDomain to bind the extension method to |
System.Int64 | contentId | long with the ID for the content |
IUserIdentifier | userIdentifier | IUserIdentifier for the user (account id), null for the current user |
CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
Task<System.Boolean> | bool |
IsLabelWatcher(IUserDomain, String, IUserIdentifier, CancellationToken)
Check if the user is watching the specified label See: https://developer.atlassian.com/cloud/confluence/rest/#api-api-user-watch-content-contentId-get
Declaration
public static async Task<bool> IsLabelWatcher(this IUserDomain confluenceClient, string label, IUserIdentifier userIdentifier = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
IUserDomain | confluenceClient | IUserDomain to bind the extension method to |
System.String | label | string with the label |
IUserIdentifier | userIdentifier | IUserIdentifier for the user (account id), null for the current user |
CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
Task<System.Boolean> | bool |
IsSpaceWatcher(IUserDomain, String, IUserIdentifier, CancellationToken)
Check if the user is watching the specified space See: https://developer.atlassian.com/cloud/confluence/rest/#api-api-user-watch-content-contentId-get
Declaration
public static async Task<bool> IsSpaceWatcher(this IUserDomain confluenceClient, string spaceKey, IUserIdentifier userIdentifier = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
IUserDomain | confluenceClient | IUserDomain to bind the extension method to |
System.String | spaceKey | string with the space key |
IUserIdentifier | userIdentifier | IUserIdentifier for the user (account id), null for the current user |
CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
Task<System.Boolean> | bool |
RemoveContentWatcher(IUserDomain, Int64, IUserIdentifier, CancellationToken)
Remove the user from the list of users watching the specified content See: https://developer.atlassian.com/cloud/confluence/rest/#api-api-user-watch-content-contentId-delete
Declaration
public static async Task RemoveContentWatcher(this IUserDomain confluenceClient, long contentId, IUserIdentifier userIdentifier = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
IUserDomain | confluenceClient | IUserDomain to bind the extension method to |
System.Int64 | contentId | long with the ID for the content |
IUserIdentifier | userIdentifier | IUserIdentifier for the user (account id), null for the current user |
CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
Task |
RemoveLabelWatcher(IUserDomain, String, IUserIdentifier, CancellationToken)
Remove the user from the list of users watching the specified label See: https://developer.atlassian.com/cloud/confluence/rest/#api-api-user-watch-label-labelName-delete
Declaration
public static async Task RemoveLabelWatcher(this IUserDomain confluenceClient, string label, IUserIdentifier userIdentifier = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
IUserDomain | confluenceClient | IUserDomain to bind the extension method to |
System.String | label | string with the label |
IUserIdentifier | userIdentifier | IUserIdentifier for the user (account id), null for the current user |
CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
Task |
RemoveSpaceWatcher(IUserDomain, String, IUserIdentifier, CancellationToken)
Remove the user from the list of users watching the specified space See: https://developer.atlassian.com/cloud/confluence/rest/#api-api-user-watch-space-spaceKey-delete
Declaration
public static async Task RemoveSpaceWatcher(this IUserDomain confluenceClient, string spaceKey, IUserIdentifier userIdentifier = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
IUserDomain | confluenceClient | IUserDomain to bind the extension method to |
System.String | spaceKey | string with the space key |
IUserIdentifier | userIdentifier | IUserIdentifier for the user (account id), null for the current user |
CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
Task |