egg-mode-rs / egg-mode

a twitter api crate for rust
https://crates.io/crates/egg-mode
Mozilla Public License 2.0
371 stars 65 forks source link

fix media upload in create_tweet example #130

Open dwrensha opened 2 years ago

dwrensha commented 2 years ago

Fixes #125.

If handle.progress is None, as it commonly is for image uploads, then get_status() will return a 404, so we need to check it before calling get_status().

I tested that this works both with an image upload, where progress is None, and a video upload, where progress is non None.

OneSecure commented 2 years ago

I have tested it. It's work fine. Thanks.

dwrensha commented 2 years ago

What would the reason be for that modification to Cargo.toml? Does cargo build --example create_tweet not work?

OneSecure commented 2 years ago

Sorry I'm newbee in rust.