Crates.io | atlas-confluence |
lib.rs | atlas-confluence |
version | 0.2.0 |
source | src |
created_at | 2023-06-16 08:36:09.883567 |
updated_at | 2023-11-12 13:03:13.631265 |
description | Simple library to interact with the Confluence REST API |
homepage | https://github.com/alvarium-hex/confluence-rs |
repository | https://github.com/alvarium-hex/confluence-rs |
max_upload_size | |
id | 892045 |
size | 13,835 |
A simple confluence API wrapper. Contributions are welcome!
let session = Session::new(
"joe@example.com".to_string(),
"your token".to_string(),
"https://example.atlassian.net/wiki".to_string(),
);
let spaces = session.get_spaces().await.expect("Failed to get spaces");
for space in spaces {
let pages = session
.get_pages_for_space(&space.key, None)
.await
.expect("Failed to get pages");
info!(
"Space({:?}): {:?} with {} pages",
space.key,
space.name,
pages.len()
);
for page in pages {
let html = &page.body.unwrap().view.unwrap().value;
// replace relative links with absolute links
let html = html.replace("(/wiki/", "(https://example.atlassian.net/wiki/");
}
}