···10721072 /// ```no_run
10731073 /// # use jacquard::client::BasicClient;
10741074 /// # use jacquard::types::string::AtUri;
10751075- /// # use jacquard_api::app_bsky::feed::post::Post;
10761076- /// use crate::jacquard::client::{Agent, AgentSessionExt};
10751075+ /// # use jacquard::api::app_bsky::feed::post::Post;
10761076+ /// # use jacquard::types::string::Datetime;
10771077+ /// # use jacquard::CowStr;
10781078+ /// use jacquard::client::MemoryCredentialSession;
10791079+ /// use jacquard::client::{Agent, AgentSessionExt};
10771080 /// # #[tokio::main]
10781081 /// # async fn main() -> Result<(), Box<dyn std::error::Error>> {
10791079- /// let (session, _) = MemoryCredentialSession::authenticated(identifier, password, None);
10821082+ /// # let (identifier, password, post_text): (CowStr<'_>, CowStr<'_>, CowStr<'_>) = todo!();
10831083+ /// let (session, _) = MemoryCredentialSession::authenticated(identifier, password, None).await?;
10801084 /// let agent = Agent::from(session);
10811081- /// let output = agent.create_record::<Post>(post, None).await?;
10851085+ /// let post = Post::builder().text(post_text).created_at(Datetime::now()).build();
10861086+ /// let output = agent.create_record(post, None).await?;
10821087 /// # Ok(())
10831088 /// # }
10841089 /// ```
+4-1
examples/app_password_create_post.rs
···2929 let agent: Agent<_> = Agent::from(session);
30303131 // Create a simple text post using the Agent convenience method
3232- let post = Post::builder().text(args.text).build();
3232+ let post = Post::builder()
3333+ .text(args.text)
3434+ .created_at(Datetime::now())
3535+ .build();
3336 let output = agent.create_record(post, None).await?;
3437 println!("✓ Created post: {}", output.uri);
3538