added download

This commit is contained in:
Waradu 2024-10-20 20:48:51 +02:00
parent 2d635f5807
commit 156472e310
No known key found for this signature in database
GPG key ID: F85AAC8BA8B8DAAD
4 changed files with 69 additions and 3 deletions

View file

@ -42,4 +42,15 @@ match client.delete(file_identifier, deletion_token).await {
}
```
Download:
```rust
let client = StreamShare::default();
match client.download(file_identifier, path).await {
Ok(_) => println!("File downloaded successfully"),
Err(e) => eprintln!("Error downloaded file: {}", e),
}
```
Check [toss](https://github.com/Waradu/to-streamshare) for a better example on how to use it.