Overview
What you get
Module
What's inside
Design
Example
use roam_sdk::{RoamClient, queries, types};
#[tokio::main]
async fn main() -> roam_sdk::Result<()> {
let client = RoamClient::new("my-graph", "my-token");
// Fetch a page
let (eid, selector) = queries::pull_page_by_title("Projects");
let resp = client.pull(eid, &selector).await?;
println!("{}", resp.result);
// Update a block
client.write(types::WriteAction::UpdateBlock {
block: types::BlockUpdate {
uid: "block-uid".into(),
string: "New content".into(),
},
}).await?;
Ok(())
}Last updated
Was this helpful?