···1072 /// ```no_run
1073 /// # use jacquard::client::BasicClient;
1074 /// # use jacquard::types::string::AtUri;
1075+ /// # use jacquard::api::app_bsky::feed::post::Post;
1076+ /// # use jacquard::types::string::Datetime;
1077+ /// # use jacquard::CowStr;
1078+ /// use jacquard::client::MemoryCredentialSession;
1079+ /// use jacquard::client::{Agent, AgentSessionExt};
1080 /// # #[tokio::main]
1081 /// # async fn main() -> Result<(), Box<dyn std::error::Error>> {
1082+ /// # let (identifier, password, post_text): (CowStr<'_>, CowStr<'_>, CowStr<'_>) = todo!();
1083+ /// let (session, _) = MemoryCredentialSession::authenticated(identifier, password, None).await?;
1084 /// let agent = Agent::from(session);
1085+ /// let post = Post::builder().text(post_text).created_at(Datetime::now()).build();
1086+ /// let output = agent.create_record(post, None).await?;
1087 /// # Ok(())
1088 /// # }
1089 /// ```
+4-1
examples/app_password_create_post.rs
···29 let agent: Agent<_> = Agent::from(session);
3031 // Create a simple text post using the Agent convenience method
32- let post = Post::builder().text(args.text).build();
00033 let output = agent.create_record(post, None).await?;
34 println!("✓ Created post: {}", output.uri);
35
···29 let agent: Agent<_> = Agent::from(session);
3031 // Create a simple text post using the Agent convenience method
32+ let post = Post::builder()
33+ .text(args.text)
34+ .created_at(Datetime::now())
35+ .build();
36 let output = agent.create_record(post, None).await?;
37 println!("✓ Created post: {}", output.uri);
38