Skip to content

Commit 37abd01

Browse files
committed
spaces
1 parent 2f7bbfa commit 37abd01

File tree

1 file changed

+36
-3
lines changed

1 file changed

+36
-3
lines changed

readme.md

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,39 @@
1+
Work in pregress...
12

3+
Implementation of Atlassian Confluence and Jira client using RUST.
24

3-
build with nightly
4-
```bash
5-
cargo +nightly run --release
5+
```rust
6+
let token = base64::encode(b"admin:admin");
7+
let conf_url = "http://localhost:8110";
8+
9+
// =============== get page
10+
let pages = get_descendants(conf_url, token, "1213317".to_string()).await;
11+
pages.results.iter().for_each(|p| println!("{:?}", p.title));
12+
13+
// =============== CREATE 20 pages
14+
let space_key = "dev3";
15+
let parent = 1212664;
16+
17+
for a in 1..20 {
18+
let title = format!("Rust page {a}");
19+
20+
let req = CreatePage {
21+
title: title.to_string(),
22+
ctype: "page".to_string(),
23+
space: CreatePageSpace {
24+
key: space_key.to_string(),
25+
},
26+
body: PageBody {
27+
storage: Storage {
28+
representation: "storage".to_string(),
29+
value: helpers::helpers::rand_string(30).to_string(),
30+
},
31+
},
32+
ancestors: vec![Ancestor {
33+
id: parent,
34+
}],
35+
};
36+
let resp = create_page(&conf_url, &token, req).await;
37+
println!("{:?}", resp);
38+
}
639
```

0 commit comments

Comments
 (0)