+4
-4
crates/jacquard/src/client.rs
+4
-4
crates/jacquard/src/client.rs
···
376
376
/// let output = agent.create_record(post, None).await?;
377
377
///
378
378
/// // Read it back
379
-
/// let response = agent.get_record::<Post>(output.uri).await?;
379
+
/// let response = agent.get_record::<Post>(&output.uri).await?;
380
380
/// let record = response.parse()?;
381
381
/// println!("Post: {}", record.value.text);
382
382
/// # Ok(())
···
477
477
/// # async fn main() -> Result<(), Box<dyn std::error::Error>> {
478
478
/// # let agent: BasicClient = todo!();
479
479
/// let uri = AtUri::new_static("at://did:plc:xyz/app.bsky.feed.post/3l5bqm7lepk2c").unwrap();
480
-
/// let response = agent.get_record::<Post>(uri).await?;
480
+
/// let response = agent.get_record::<Post>(&uri).await?;
481
481
/// let output = response.parse()?; // PostGetRecordOutput<'_> borrowing from buffer
482
482
/// println!("Post text: {}", output.value.text);
483
483
///
···
601
601
/// # let agent: BasicClient = todo!();
602
602
/// let uri = AtUri::new_static("at://did:plc:xyz/app.bsky.actor.profile/self").unwrap();
603
603
/// // Update profile record in-place
604
-
/// agent.update_record::<Profile>(uri, |profile| {
604
+
/// agent.update_record::<Profile>(&uri, |profile| {
605
605
/// profile.display_name = Some(CowStr::from("New Name"));
606
606
/// profile.description = Some(CowStr::from("Updated bio"));
607
607
/// }).await?;
···
1023
1023
/// # async fn main() -> Result<(), Box<dyn std::error::Error>> {
1024
1024
/// let client = BasicClient::unauthenticated();
1025
1025
/// let uri = AtUri::new_static("at://did:plc:xyz/app.bsky.feed.post/3l5abc").unwrap();
1026
-
/// let response = client.get_record::<Post<'_>>(uri).await?;
1026
+
/// let response = client.get_record::<Post<'_>>(&uri).await?;
1027
1027
/// # Ok(())
1028
1028
/// # }
1029
1029
/// ```
+1
-1
examples/read_whitewind_post.rs
+1
-1
examples/read_whitewind_post.rs
···
22
22
let agent = BasicClient::unauthenticated();
23
23
24
24
// Use Agent's get_record helper with the at:// URI
25
-
let response = agent.get_record::<Entry>(uri).await?;
25
+
let response = agent.get_record::<Entry>(&uri).await?;
26
26
let output = response.into_output()?;
27
27
28
28
println!("📚 WhiteWind Blog Entry\n");
+1
-1
examples/update_profile.rs
+1
-1
examples/update_profile.rs
···
48
48
49
49
// Update profile in-place using the fetch-modify-put pattern
50
50
agent
51
-
.update_record::<Profile>(uri, |profile| {
51
+
.update_record::<Profile>(&uri, |profile| {
52
52
if let Some(name) = &args.display_name {
53
53
profile.display_name = Some(CowStr::from(name.clone()));
54
54
}