Byron / google-apis-rs

A binding and CLI generator for all Google APIs
http://byron.github.io/google-apis-rs
Other
1.02k stars 135 forks source link

[Feature] Google Drive: Allow progress monitoring for downloads & uploads #355

Open semtexzv opened 2 years ago

semtexzv commented 2 years ago

When working with large files, It'd be nice to be able to monitor the progress of upload/download. Adding a new method to delegate that would be called after every chunk with position in the stream.

Byron commented 2 years ago

I do conquer!

It might be interesting to implement it so that the caller can inspect the chunk and its bytes, as to allow calculations to happen while streaming.

dmatos2012 commented 1 year ago

This would be super cool as well! I was just now trying to do it, but I also was not able to inspect percentage for file upload, and would get only a response once its finished via the Delegate Trait.

I would gladly help: problem is I am bit new to rust, but not sure how difficult this would be to implement. Perhaps if you could help me with pointers or where to look/what to look out for, I could give it a try, and perhaps message if super confused :).

Btw: Very helpful and cool videos on your Learning Rust with Gitoxide playlist. I have watched some of them and found them very helpful to improve my Rust:)

Byron commented 1 year ago

Thanks, it's good to hear these videos make a difference :).

As for learning Rust, this project probably isn't well suited as it's mostly python and a template language called 'mako', which generates all the Rust code. Working with it isn't terrible, but definitely more abstract than it should be for stepping into Rust. On top of that I am swamped and can't offer any mentoring. I will review PRs though in case you want to give it a shot anyway.