Class SpaceExtensions
All space related extension methods
Inheritance
Inherited Members
Namespace: Dapplo.Confluence
Assembly: Dapplo.Confluence.dll
Syntax
public static class SpaceExtensions
Methods
| Improve this Doc View SourceCreateAsync(ISpaceDomain, String, String, String, CancellationToken)
Create a space
Declaration
public static async Task<Space> CreateAsync(this ISpaceDomain confluenceClient, string key, string name, string description, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
ISpaceDomain | confluenceClient | ISpaceDomain to bind the extension method to |
System.String | key | Key for the space |
System.String | name | Name for the space |
System.String | description | Description for the space |
CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
Task<Space> | created Space |
CreatePrivateAsync(ISpaceDomain, String, String, String, CancellationToken)
Create a private space
Declaration
public static async Task<Space> CreatePrivateAsync(this ISpaceDomain confluenceClient, string key, string name, string description, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
ISpaceDomain | confluenceClient | ISpaceDomain to bind the extension method to |
System.String | key | Key for the space |
System.String | name | Name for the space |
System.String | description | Description for the space |
CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
Task<Space> | created Space |
DeleteAsync(ISpaceDomain, String, CancellationToken)
Delete a space
Declaration
public static async Task<LongRunningTask> DeleteAsync(this ISpaceDomain confluenceClient, string key, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
ISpaceDomain | confluenceClient | ISpaceDomain to bind the extension method to |
System.String | key | Key for the space |
CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
Task<LongRunningTask> | Long running task, which takes care of deleting the space |
GetAllAsync(ISpaceDomain, CancellationToken)
Get Spaces with all the defaults, see here
Declaration
public static Task<IList<Space>> GetAllAsync(this ISpaceDomain confluenceClient, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
ISpaceDomain | confluenceClient | ISpaceDomain to bind the extension method to |
CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
Task<IList<Space>> | List of Spaces |
GetAllWithParametersAsync(ISpaceDomain, IEnumerable<String>, String, String, String, Nullable<Boolean>, PagingInformation, CancellationToken)
Get Spaces with specific parameters, see here
Declaration
public static async Task<IList<Space>> GetAllWithParametersAsync(this ISpaceDomain confluenceClient, IEnumerable<string> spaceKeys = null, string type = null, string status = null, string label = null, bool? favourite = null, PagingInformation pagingInformation = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
ISpaceDomain | confluenceClient | ISpaceDomain to bind the extension method to |
IEnumerable<System.String> | spaceKeys | IEnumerable of string with space keys |
System.String | type | string filter the list of spaces returned by type (global, personal) |
System.String | status | string filter the list of spaces returned by status (current, archived) |
System.String | label | string filter the list of spaces returned by label |
System.Nullable<System.Boolean> | favourite | bool filter the list of spaces returned by favorites |
PagingInformation | pagingInformation | PagingInformation |
CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
Task<IList<Space>> | List of Spaces |
GetAsync(ISpaceDomain, String, CancellationToken)
Get Space information see here
Declaration
public static async Task<Space> GetAsync(this ISpaceDomain confluenceClient, string spaceKey, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
ISpaceDomain | confluenceClient | ISpaceDomain to bind the extension method to |
System.String | spaceKey | the space key |
CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
Task<Space> | Space |
GetContentsAsync(ISpaceDomain, String, CancellationToken)
Get Contents in a space, see here
Declaration
public static async Task<SpaceContents> GetContentsAsync(this ISpaceDomain confluenceClient, string space, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
ISpaceDomain | confluenceClient | IContentDomain to bind the extension method to |
System.String | space | space key to get the content for |
CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
Task<SpaceContents> | List with Content |
UpdateAsync(ISpaceDomain, Space, CancellationToken)
Update a space
Declaration
public static async Task<Space> UpdateAsync(this ISpaceDomain confluenceClient, Space space, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
ISpaceDomain | confluenceClient | ISpaceDomain to bind the extension method to |
Space | space | Space to update |
CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
Task<Space> | created Space |