jc-conf
Typed client for Confluence Cloud REST v2.
Used by the jc CLI.
Coverage
- Pages —
get(body rendered as ADF viabody-format=atlas_doc_format),list(with--parentchildren filter and v2 cursor pagination via_links.next),create,update,delete, plus aBodyRequest::from_adfhelper that handles the v2 envelope's double-serialized ADF string quirk. - Spaces —
list,get,find_by_key,resolve_id(for transparent--space ENG→ numeric spaceId resolution). - Attachments —
get_meta(v2),list_on_page(v2 with pagination),download(follows the attachment'sdownloadLink),upload(still uses the v1 multipart endpoint because v2 doesn't cover attachment upload yet). - Search —
cqlagainst/wiki/rest/api/searchwith old-style start/limit pagination, since CQL hasn't been modernized to v2.
All HTTP goes through jc-core;
markdown ↔ ADF conversion is delegated to
jc-adf.
Usage
use Client;
use Url;
let client = new?;
// Fetch a page with body as ADF
let page = get.await?;
if let Some = page.body.and_then
// Resolve a space key to its numeric ID
let space_id = resolve_id.await?;
// Create a new page from a markdown-derived ADF tree
let adf = to_adf;
let req = CreatePageRequest ;
let page = create.await?;
License
MIT — see LICENSE.