API Reference
ConfluenceClient
Dependency-light Confluence Cloud page and attachment client.
Inheritance
- Object
- ConfluenceClient
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by
Constructors
public ConfluenceClient(ConfluenceSession session) #Creates a client that sends requests using the supplied session.
Parameters
- session OfficeIMO.Confluence.ConfluenceSession
Methods
public Task<ConfluencePage> CreatePageAsync(ConfluencePageCreateRequest request, CancellationToken cancellationToken = default) #Task<ConfluencePage>Creates a page. Non-idempotent writes are never retried automatically.
Parameters
- request OfficeIMO.Confluence.ConfluencePageCreateRequest
- cancellationToken System.Threading.CancellationToken = default
public async Task DeletePageAsync(String pageId, Boolean purge = false, Boolean draft = false, CancellationToken cancellationToken = default) #TaskDeletes a page. This non-idempotent operation is never retried automatically.
Parameters
- pageId System.String
- purge System.Boolean = false
- draft System.Boolean = false
- cancellationToken System.Threading.CancellationToken = default
public virtual Void Dispose() #VoidReleases the client's resources without disposing a caller-supplied HTTP client.
public async Task<Byte[]> DownloadAttachmentAsync(String pageId, String attachmentId, CancellationToken cancellationToken = default) #Task<Byte[]>Downloads an attachment through Confluence's authenticated redirect endpoint.
Parameters
- pageId System.String
- attachmentId System.String
- cancellationToken System.Threading.CancellationToken = default
public Task DownloadAttachmentAsync(String pageId, String attachmentId, Stream destination, CancellationToken cancellationToken = default) #TaskStreams an attachment through Confluence's authenticated redirect endpoint.
Parameters
- pageId System.String
- attachmentId System.String
- destination System.IO.Stream
- cancellationToken System.Threading.CancellationToken = default
public async Task<ConfluenceAttachmentBatch> GetAttachmentsAsync(String pageId, String cursor = null, Int32 limit = 50, CancellationToken cancellationToken = default) #Task<ConfluenceAttachmentBatch>Lists one cursor-addressable batch of attachments for a page.
Parameters
- pageId System.String
- cursor System.String = null
- limit System.Int32 = 50
- cancellationToken System.Threading.CancellationToken = default
public Task<ConfluencePage> GetPageAsync(String pageId, ConfluenceBodyFormat bodyFormat = AtlasDocFormat, CancellationToken cancellationToken = default) #Task<ConfluencePage>Reads a page with the requested body representation.
Parameters
- pageId System.String
- bodyFormat OfficeIMO.Confluence.ConfluenceBodyFormat = AtlasDocFormat
- cancellationToken System.Threading.CancellationToken = default
public async Task<ConfluencePageBatch> GetPagesAsync(ConfluencePageQuery query = null, CancellationToken cancellationToken = default) #Task<ConfluencePageBatch>Lists one cursor-addressable batch of pages.
Parameters
- query OfficeIMO.Confluence.ConfluencePageQuery = null
- cancellationToken System.Threading.CancellationToken = default
public static ConfluencePageWritePlan PlanCreatePage(ConfluencePageCreateRequest request) #ConfluencePageWritePlanBuilds the exact create request without contacting Confluence.
Parameters
- request OfficeIMO.Confluence.ConfluencePageCreateRequest
public static ConfluencePageWritePlan PlanDeletePage(String pageId, Boolean purge = false, Boolean draft = false) #ConfluencePageWritePlanBuilds the exact delete request without contacting Confluence.
Parameters
- pageId System.String
- purge System.Boolean = false
- draft System.Boolean = false
public static ConfluencePageWritePlan PlanUpdatePage(ConfluencePageUpdateRequest request) #ConfluencePageWritePlanBuilds the exact update request without contacting Confluence.
Parameters
- request OfficeIMO.Confluence.ConfluencePageUpdateRequest
public Task<ConfluencePage> UpdatePageAsync(ConfluencePageUpdateRequest request, CancellationToken cancellationToken = default) #Task<ConfluencePage>Updates a page using the caller-supplied next version number. Writes are never retried automatically.
Parameters
- request OfficeIMO.Confluence.ConfluencePageUpdateRequest
- cancellationToken System.Threading.CancellationToken = default
public async Task<IReadOnlyList<ConfluenceAttachment>> UploadAttachmentAsync(String pageId, ConfluenceAttachmentUpload upload, CancellationToken cancellationToken = default) #Task<IReadOnlyList<ConfluenceAttachment>>Creates or versions an attachment through Confluence's multipart v1 endpoint.
Parameters
- pageId System.String
- upload OfficeIMO.Confluence.ConfluenceAttachmentUpload
- cancellationToken System.Threading.CancellationToken = default
public async Task<IReadOnlyList<ConfluenceAttachment>> UploadAttachmentAsync(String pageId, ConfluenceAttachmentStreamUpload upload, CancellationToken cancellationToken = default) #Task<IReadOnlyList<ConfluenceAttachment>>Creates or versions an attachment from a caller-owned stream.
Parameters
- pageId System.String
- upload OfficeIMO.Confluence.ConfluenceAttachmentStreamUpload
- cancellationToken System.Threading.CancellationToken = default
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
Properties
public ConfluenceSession Session { get; } #Gets the session supplied to this client.