Getting Started
Add the dependency
cargo add roam-sdk[dependencies]
roam-sdk = "0.3"
tokio = { version = "1", features = ["full"] }Create a client
use roam_sdk::RoamClient;
let client = RoamClient::new("your-graph-name", "your-api-token");Read a daily note
use roam_sdk::{RoamClient, queries, types::DailyNote};
use chrono::NaiveDate;
#[tokio::main]
async fn main() -> roam_sdk::Result<()> {
let client = RoamClient::new("my-graph", "my-token");
let date = NaiveDate::from_ymd_opt(2026, 2, 21).unwrap();
let uid = queries::daily_note_uid_for_date(2, 21, 2026); // "02-21-2026"
let (eid, selector) = queries::pull_daily_note(&uid);
let resp = client.pull(eid, &selector).await?;
let note = DailyNote::from_pull_response(date, uid, &resp.result);
println!("Title: {}", note.title);
for block in ¬e.blocks {
println!(" - {}", block.string);
}
Ok(())
}Read any page
Find linked references
Write operations
Error handling
Last updated
Was this helpful?