Mercurial > lbo > hg > async-google-apis
changeset 113:fdf0330d1cc4
Elaborate on download methods.
author | Lewin Bormann <lbo@spheniscida.de> |
---|---|
date | Sun, 25 Oct 2020 09:13:44 +0100 |
parents | 172a9155c7a9 |
children | 346677d7293b |
files | async-google-apis-common/Cargo.lock generate/templates.py |
diffstat | 2 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/async-google-apis-common/Cargo.lock Sun Oct 25 09:04:32 2020 +0100 +++ b/async-google-apis-common/Cargo.lock Sun Oct 25 09:13:44 2020 +0100 @@ -14,7 +14,7 @@ [[package]] name = "async-google-apis-common" -version = "0.1.5" +version = "0.1.6" dependencies = [ "anyhow", "chrono",
--- a/generate/templates.py Sun Oct 25 09:04:32 2020 +0100 +++ b/generate/templates.py Sun Oct 25 09:13:44 2020 +0100 @@ -250,7 +250,10 @@ DownloadMethodTmpl = ''' /// {{{description}}} /// -/// This method downloads data. +/// This method downloads data. Depending on the server returning a `Content-Type` of `application/json` +/// or a non-JSON type, the returned value indicates if a download took place or data was written to +/// `dst`. If `dst` is `None` despite data being available for download, `ApiError::DataAvailableError` +/// is returned. pub async fn {{{name}}}( &mut self, params: &{{{param_type}}}, {{#in_type}}req: &{{{in_type}}},{{/in_type}} dst: Option<&mut dyn std::io::Write>) -> Result<DownloadResponse<{{out_type}}>> {