Class ConfluenceClient
A Confluence client build by using Dapplo.HttpExtensions
Inheritance
Implements
Inherited Members
Namespace: Dapplo.Confluence
Assembly: Dapplo.Confluence.dll
Syntax
public class ConfluenceClient : IConfluenceClientPlugins, IAttachmentDomain, IUserDomain, ISpaceDomain, IContentDomain, IMiscDomain, IGroupDomain, IConfluenceDomain, IConfluenceClient
Constructors
| Improve this Doc View SourceConfluenceClient()
Declaration
protected ConfluenceClient()
ConfluenceClient(Uri, IHttpSettings)
Create the ConfluenceApi object, here the HttpClient is configured
Declaration
protected ConfluenceClient(Uri confluenceUri, IHttpSettings httpSettings = null)
Parameters
Type | Name | Description |
---|---|---|
Uri | confluenceUri | Base URL, e.g. https://yourConfluenceserver |
IHttpSettings | httpSettings | IHttpSettings or null for default |
Properties
| Improve this Doc View SourceAttachment
The attachment domain
Declaration
public IAttachmentDomain Attachment { get; }
Property Value
Type | Description |
---|---|
IAttachmentDomain |
Behaviour
Store the specific HttpBehaviour, which contains a IHttpSettings and also some additional logic for making a HttpClient which works with Confluence
Declaration
public IHttpBehaviour Behaviour { get; protected set; }
Property Value
Type | Description |
---|---|
IHttpBehaviour |
ConfluenceApiUri
The base URI for your Confluence server api calls
Declaration
public Uri ConfluenceApiUri { get; }
Property Value
Type | Description |
---|---|
Uri |
ConfluenceUri
The base URI for your Confluence server downloads
Declaration
public Uri ConfluenceUri { get; }
Property Value
Type | Description |
---|---|
Uri |
Content
The content domain
Declaration
public IContentDomain Content { get; }
Property Value
Type | Description |
---|---|
IContentDomain |
Group
The group domain
Declaration
public IGroupDomain Group { get; }
Property Value
Type | Description |
---|---|
IGroupDomain |
HttpBehaviour
The IHttpBehaviour for this Confluence instance
Declaration
public IHttpBehaviour HttpBehaviour { get; }
Property Value
Type | Description |
---|---|
IHttpBehaviour |
Misc
The misc domain
Declaration
public IMiscDomain Misc { get; }
Property Value
Type | Description |
---|---|
IMiscDomain |
Plugins
Plugins dock to this property by implementing an extension method to IConfluenceClientPlugins
Declaration
public IConfluenceClientPlugins Plugins { get; }
Property Value
Type | Description |
---|---|
IConfluenceClientPlugins |
Space
The space domain
Declaration
public ISpaceDomain Space { get; }
Property Value
Type | Description |
---|---|
ISpaceDomain |
User
The user domain
Declaration
public IUserDomain User { get; }
Property Value
Type | Description |
---|---|
IUserDomain |
Methods
| Improve this Doc View SourceConfigureBehaviour(IChangeableHttpBehaviour, IHttpSettings)
Helper method to configure the IChangeableHttpBehaviour
Declaration
protected IHttpBehaviour ConfigureBehaviour(IChangeableHttpBehaviour behaviour, IHttpSettings httpSettings = null)
Parameters
Type | Name | Description |
---|---|---|
IChangeableHttpBehaviour | behaviour | IChangeableHttpBehaviour |
IHttpSettings | httpSettings | IHttpSettings |
Returns
Type | Description |
---|---|
IHttpBehaviour | the behaviour, but configured as IHttpBehaviour |
Create(Uri, IHttpSettings)
Factory method to create a ConfluenceClient
Declaration
public static IConfluenceClient Create(Uri confluenceUri, IHttpSettings httpSettings = null)
Parameters
Type | Name | Description |
---|---|---|
Uri | confluenceUri | Uri to your confluence server |
IHttpSettings | httpSettings | IHttpSettings used if you need specific settings |
Returns
Type | Description |
---|---|
IConfluenceClient | IConfluenceClient |
CreateDownloadUri(Links)
Retrieve the Download as Uri from the supplied links object
Declaration
public Uri CreateDownloadUri(Links links)
Parameters
Type | Name | Description |
---|---|---|
Links | links | Links |
Returns
Type | Description |
---|---|
Uri | Uri |
CreateJsonNetJsonSerializer()
Factory for CreateJsonNetJsonSerializer
Declaration
public static JsonNetJsonSerializer CreateJsonNetJsonSerializer()
Returns
Type | Description |
---|---|
JsonNetJsonSerializer | JsonNetJsonSerializer |
CreateTinyUiUri(Links)
Retrieve the TinyUi as Uri from the supplied links object
Declaration
public Uri CreateTinyUiUri(Links links)
Parameters
Type | Name | Description |
---|---|---|
Links | links | Links |
Returns
Type | Description |
---|---|
Uri | Uri |
CreateWebUiUri(Links)
Retrieve the WebUi as Uri from the supplied links object
Declaration
public Uri CreateWebUiUri(Links links)
Parameters
Type | Name | Description |
---|---|---|
Links | links | Links |
Returns
Type | Description |
---|---|
Uri | Uri |
IsCloudServer(CancellationToken)
Checks if the client is connected to a cloud server
Declaration
public Task<bool> IsCloudServer(CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<System.Boolean> | bool |
PromoteContext()
This makes sure that the HttpBehavior is promoted for the following Http call.
Declaration
public void PromoteContext()
SetBasicAuthentication(String, String)
Set Basic Authentication for the current client
Declaration
public void SetBasicAuthentication(string user, string password)
Parameters
Type | Name | Description |
---|---|---|
System.String | user | username |
System.String | password | password |
SetBearerAuthentication(String)
Set Bearer Authentication for the current client
Declaration
public void SetBearerAuthentication(string bearer)
Parameters
Type | Name | Description |
---|---|---|
System.String | bearer | bearer |