aboutsummaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/src/lib.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/client/src/lib.rs b/client/src/lib.rs
index 19be760..f55929a 100644
--- a/client/src/lib.rs
+++ b/client/src/lib.rs
@@ -78,6 +78,18 @@ impl Session {
.get(format!("{}/n/{id}", self.instance.base()))
.send()
.await?
+ .error_for_status()?
+ .json()
+ .await?)
+ }
+ pub async fn node_extended(&self, id: &str) -> Result<NodePublic> {
+ debug!("downloading extended node {id:?}");
+ Ok(self
+ .client
+ .get(format!("{}/n/{id}/extended", self.instance.base()))
+ .send()
+ .await?
+ .error_for_status()?
.json()
.await?)
}