Skip to content

Commit

Permalink
Add a little more documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
dscottboggs committed Jan 29, 2023
1 parent 0cfe4d7 commit b6d6651
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/mastodon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,21 @@ impl Mastodon {
/// println!("{}", attachment.url);
/// });
/// ```
///
/// For a different polling time, use `.into()` on a `std::time::Duration`.
/// ```rust,no_run
/// use mastodon_async::prelude::*;
/// use std::time::Duration;
/// let mastodon = Mastodon::from(Data::default());
/// tokio_test::block_on(async {
/// let attachment = mastodon.media("/path/to/some/file.jpg", None).await.expect("upload");
/// let attachment = mastodon.wait_for_processing(
/// attachment,
/// Duration::from_secs(1).into(),
/// ).await.expect("processing");
/// println!("{}", attachment.url);
/// });
/// ```
pub async fn wait_for_processing(
&self,
mut attachment: Attachment,
Expand Down

0 comments on commit b6d6651

Please sign in to comment.