mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-01-22 03:04:07 +01:00
regenerate drive3
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
[package]
|
||||
|
||||
name = "google-drive3-cli"
|
||||
version = "2.0.8+20210322"
|
||||
version = "2.0.10+20210322"
|
||||
authors = ["Sebastian Thiel <byronimo@gmail.com>"]
|
||||
description = "A complete library to interact with drive (protocol v3)"
|
||||
repository = "https://github.com/Byron/google-apis-rs/tree/main/gen/drive3-cli"
|
||||
@@ -37,4 +37,4 @@ tokio = { version = "^ 1.0", features = ["full"] }
|
||||
|
||||
[dependencies.google-drive3]
|
||||
path = "../drive3"
|
||||
version = "2.0.8+20210322"
|
||||
version = "2.0.10+20210322"
|
||||
|
||||
@@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma
|
||||
|
||||
# Usage
|
||||
|
||||
This documentation was generated from the *drive* API at revision *20210322*. The CLI is at version *2.0.8*.
|
||||
This documentation was generated from the *drive* API at revision *20210322*. The CLI is at version *2.0.10*.
|
||||
|
||||
```bash
|
||||
drive3 [options]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
site_name: drive v2.0.8+20210322
|
||||
site_name: drive v2.0.10+20210322
|
||||
site_url: http://byron.github.io/google-apis-rs/google-drive3-cli
|
||||
site_description: A complete library to interact with drive (protocol v3)
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// DO NOT EDIT
|
||||
use clap::{App, SubCommand};
|
||||
use mime::Mime;
|
||||
use oauth2::{ApplicationSecret, ConsoleApplicationSecret};
|
||||
use crate::oauth2::{ApplicationSecret, ConsoleApplicationSecret};
|
||||
use serde_json as json;
|
||||
use serde_json::value::Value;
|
||||
|
||||
|
||||
@@ -7,13 +7,12 @@ extern crate tokio;
|
||||
|
||||
#[macro_use]
|
||||
extern crate clap;
|
||||
extern crate yup_oauth2 as oauth2;
|
||||
|
||||
use std::env;
|
||||
use std::io::{self, Write};
|
||||
use clap::{App, SubCommand, Arg};
|
||||
|
||||
use google_drive3::{api, Error};
|
||||
use google_drive3::{api, Error, oauth2};
|
||||
|
||||
mod client;
|
||||
|
||||
@@ -4275,9 +4274,9 @@ impl<'n> Engine<'n> {
|
||||
}
|
||||
};
|
||||
|
||||
let auth = yup_oauth2::InstalledFlowAuthenticator::builder(
|
||||
let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
secret,
|
||||
yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
|
||||
oauth2::InstalledFlowReturnMethod::HTTPRedirect,
|
||||
).persist_tokens_to_disk(format!("{}/drive3", config_dir)).build().await.unwrap();
|
||||
|
||||
let client = hyper::Client::builder().build(hyper_rustls::HttpsConnector::with_native_roots());
|
||||
@@ -5473,7 +5472,7 @@ async fn main() {
|
||||
|
||||
let mut app = App::new("drive3")
|
||||
.author("Sebastian Thiel <byronimo@gmail.com>")
|
||||
.version("2.0.8+20210322")
|
||||
.version("2.0.10+20210322")
|
||||
.about("Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.")
|
||||
.after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_drive3_cli")
|
||||
.arg(Arg::with_name("url")
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
[package]
|
||||
|
||||
name = "google-drive3"
|
||||
version = "2.0.9+20210322"
|
||||
version = "2.0.10+20210322"
|
||||
authors = ["Sebastian Thiel <byronimo@gmail.com>"]
|
||||
description = "A complete library to interact with drive (protocol v3)"
|
||||
repository = "https://github.com/Byron/google-apis-rs/tree/main/gen/drive3"
|
||||
homepage = "https://developers.google.com/drive/"
|
||||
documentation = "https://docs.rs/google-drive3/2.0.9+20210322"
|
||||
documentation = "https://docs.rs/google-drive3/2.0.10+20210322"
|
||||
license = "MIT"
|
||||
keywords = ["drive", "google", "protocol", "web", "api"]
|
||||
autobins = false
|
||||
|
||||
@@ -5,55 +5,55 @@ DO NOT EDIT !
|
||||
-->
|
||||
The `google-drive3` library allows access to all features of the *Google drive* service.
|
||||
|
||||
This documentation was generated from *drive* crate version *2.0.9+20210322*, where *20210322* is the exact revision of the *drive:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v2.0.9*.
|
||||
This documentation was generated from *drive* crate version *2.0.10+20210322*, where *20210322* is the exact revision of the *drive:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v2.0.10*.
|
||||
|
||||
Everything else about the *drive* *v3* API can be found at the
|
||||
[official documentation site](https://developers.google.com/drive/).
|
||||
# Features
|
||||
|
||||
Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/DriveHub) ...
|
||||
Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/DriveHub) ...
|
||||
|
||||
* [about](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::About)
|
||||
* [*get*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::AboutGetCall)
|
||||
* [changes](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::Change)
|
||||
* [*get start page token*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::ChangeGetStartPageTokenCall), [*list*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::ChangeListCall) and [*watch*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::ChangeWatchCall)
|
||||
* [channels](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::Channel)
|
||||
* [*stop*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::ChannelStopCall)
|
||||
* [comments](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::Comment)
|
||||
* [*create*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::CommentCreateCall), [*delete*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::CommentDeleteCall), [*get*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::CommentGetCall), [*list*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::CommentListCall) and [*update*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::CommentUpdateCall)
|
||||
* [drives](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::Drive)
|
||||
* [*create*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::DriveCreateCall), [*delete*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::DriveDeleteCall), [*get*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::DriveGetCall), [*hide*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::DriveHideCall), [*list*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::DriveListCall), [*unhide*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::DriveUnhideCall) and [*update*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::DriveUpdateCall)
|
||||
* [files](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::File)
|
||||
* [*copy*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::FileCopyCall), [*create*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::FileCreateCall), [*delete*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::FileDeleteCall), [*empty trash*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::FileEmptyTrashCall), [*export*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::FileExportCall), [*generate ids*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::FileGenerateIdCall), [*get*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::FileGetCall), [*list*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::FileListCall), [*update*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::FileUpdateCall) and [*watch*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::FileWatchCall)
|
||||
* [permissions](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::Permission)
|
||||
* [*create*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::PermissionCreateCall), [*delete*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::PermissionDeleteCall), [*get*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::PermissionGetCall), [*list*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::PermissionListCall) and [*update*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::PermissionUpdateCall)
|
||||
* [replies](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::Reply)
|
||||
* [*create*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::ReplyCreateCall), [*delete*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::ReplyDeleteCall), [*get*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::ReplyGetCall), [*list*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::ReplyListCall) and [*update*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::ReplyUpdateCall)
|
||||
* [revisions](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::Revision)
|
||||
* [*delete*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::RevisionDeleteCall), [*get*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::RevisionGetCall), [*list*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::RevisionListCall) and [*update*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::RevisionUpdateCall)
|
||||
* [about](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::About)
|
||||
* [*get*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::AboutGetCall)
|
||||
* [changes](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::Change)
|
||||
* [*get start page token*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::ChangeGetStartPageTokenCall), [*list*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::ChangeListCall) and [*watch*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::ChangeWatchCall)
|
||||
* [channels](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::Channel)
|
||||
* [*stop*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::ChannelStopCall)
|
||||
* [comments](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::Comment)
|
||||
* [*create*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::CommentCreateCall), [*delete*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::CommentDeleteCall), [*get*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::CommentGetCall), [*list*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::CommentListCall) and [*update*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::CommentUpdateCall)
|
||||
* [drives](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::Drive)
|
||||
* [*create*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::DriveCreateCall), [*delete*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::DriveDeleteCall), [*get*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::DriveGetCall), [*hide*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::DriveHideCall), [*list*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::DriveListCall), [*unhide*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::DriveUnhideCall) and [*update*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::DriveUpdateCall)
|
||||
* [files](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::File)
|
||||
* [*copy*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::FileCopyCall), [*create*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::FileCreateCall), [*delete*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::FileDeleteCall), [*empty trash*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::FileEmptyTrashCall), [*export*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::FileExportCall), [*generate ids*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::FileGenerateIdCall), [*get*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::FileGetCall), [*list*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::FileListCall), [*update*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::FileUpdateCall) and [*watch*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::FileWatchCall)
|
||||
* [permissions](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::Permission)
|
||||
* [*create*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::PermissionCreateCall), [*delete*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::PermissionDeleteCall), [*get*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::PermissionGetCall), [*list*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::PermissionListCall) and [*update*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::PermissionUpdateCall)
|
||||
* [replies](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::Reply)
|
||||
* [*create*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::ReplyCreateCall), [*delete*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::ReplyDeleteCall), [*get*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::ReplyGetCall), [*list*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::ReplyListCall) and [*update*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::ReplyUpdateCall)
|
||||
* [revisions](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::Revision)
|
||||
* [*delete*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::RevisionDeleteCall), [*get*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::RevisionGetCall), [*list*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::RevisionListCall) and [*update*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::RevisionUpdateCall)
|
||||
* teamdrives
|
||||
* [*create*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::TeamdriveCreateCall), [*delete*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::TeamdriveDeleteCall), [*get*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::TeamdriveGetCall), [*list*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::TeamdriveListCall) and [*update*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::TeamdriveUpdateCall)
|
||||
* [*create*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::TeamdriveCreateCall), [*delete*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::TeamdriveDeleteCall), [*get*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::TeamdriveGetCall), [*list*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::TeamdriveListCall) and [*update*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::TeamdriveUpdateCall)
|
||||
|
||||
|
||||
Upload supported by ...
|
||||
|
||||
* [*create files*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::FileCreateCall)
|
||||
* [*update files*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::FileUpdateCall)
|
||||
* [*create files*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::FileCreateCall)
|
||||
* [*update files*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::FileUpdateCall)
|
||||
|
||||
Download supported by ...
|
||||
|
||||
* [*export files*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::FileExportCall)
|
||||
* [*get files*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::FileGetCall)
|
||||
* [*watch files*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::FileWatchCall)
|
||||
* [*get revisions*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::RevisionGetCall)
|
||||
* [*export files*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::FileExportCall)
|
||||
* [*get files*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::FileGetCall)
|
||||
* [*watch files*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::FileWatchCall)
|
||||
* [*get revisions*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::RevisionGetCall)
|
||||
|
||||
Subscription supported by ...
|
||||
|
||||
* [*list changes*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::ChangeListCall)
|
||||
* [*watch changes*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::ChangeWatchCall)
|
||||
* [*create files*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::FileCreateCall)
|
||||
* [*get files*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::FileGetCall)
|
||||
* [*watch files*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/api::FileWatchCall)
|
||||
* [*list changes*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::ChangeListCall)
|
||||
* [*watch changes*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::ChangeWatchCall)
|
||||
* [*create files*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::FileCreateCall)
|
||||
* [*get files*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::FileGetCall)
|
||||
* [*watch files*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/api::FileWatchCall)
|
||||
|
||||
|
||||
|
||||
@@ -61,17 +61,17 @@ Subscription supported by ...
|
||||
|
||||
The API is structured into the following primary items:
|
||||
|
||||
* **[Hub](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/DriveHub)**
|
||||
* **[Hub](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/DriveHub)**
|
||||
* a central object to maintain state and allow accessing all *Activities*
|
||||
* creates [*Method Builders*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/client::MethodsBuilder) which in turn
|
||||
allow access to individual [*Call Builders*](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/client::CallBuilder)
|
||||
* **[Resources](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/client::Resource)**
|
||||
* creates [*Method Builders*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/client::MethodsBuilder) which in turn
|
||||
allow access to individual [*Call Builders*](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/client::CallBuilder)
|
||||
* **[Resources](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/client::Resource)**
|
||||
* primary types that you can apply *Activities* to
|
||||
* a collection of properties and *Parts*
|
||||
* **[Parts](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/client::Part)**
|
||||
* **[Parts](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/client::Part)**
|
||||
* a collection of properties
|
||||
* never directly used in *Activities*
|
||||
* **[Activities](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/client::CallBuilder)**
|
||||
* **[Activities](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/client::CallBuilder)**
|
||||
* operations to apply to *Resources*
|
||||
|
||||
All *structures* are marked with applicable traits to further categorize them and ease browsing.
|
||||
@@ -111,8 +111,6 @@ To use this library, you would put the following lines into your `Cargo.toml` fi
|
||||
```toml
|
||||
[dependencies]
|
||||
google-drive3 = "*"
|
||||
hyper = "^0.14"
|
||||
hyper-rustls = "^0.22"
|
||||
serde = "^1.0"
|
||||
serde_json = "^1.0"
|
||||
```
|
||||
@@ -125,7 +123,7 @@ extern crate hyper_rustls;
|
||||
extern crate google_drive3 as drive3;
|
||||
use drive3::{Result, Error};
|
||||
use std::default::Default;
|
||||
use drive3::{DriveHub, oauth2};
|
||||
use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
|
||||
// Get an ApplicationSecret instance by some means. It contains the `client_id` and
|
||||
// `client_secret`, among other things.
|
||||
@@ -181,17 +179,17 @@ match result {
|
||||
```
|
||||
## Handling Errors
|
||||
|
||||
All errors produced by the system are provided either as [Result](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/client::Result) enumeration as return value of
|
||||
All errors produced by the system are provided either as [Result](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/client::Result) enumeration as return value of
|
||||
the doit() methods, or handed as possibly intermediate results to either the
|
||||
[Hub Delegate](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/client::Delegate), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html).
|
||||
[Hub Delegate](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/client::Delegate), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html).
|
||||
|
||||
When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This
|
||||
makes the system potentially resilient to all kinds of errors.
|
||||
|
||||
## Uploads and Downloads
|
||||
If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/client::Result), should be
|
||||
If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/client::Result), should be
|
||||
read by you to obtain the media.
|
||||
If such a method also supports a [Response Result](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/client::ResponseResult), it will return that by default.
|
||||
If such a method also supports a [Response Result](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/client::ResponseResult), it will return that by default.
|
||||
You can see it as meta-data for the actual media. To trigger a media download, you will have to set up the builder by making
|
||||
this call: `.param("alt", "media")`.
|
||||
|
||||
@@ -201,29 +199,29 @@ Methods supporting uploads can do so using up to 2 different protocols:
|
||||
|
||||
## Customization and Callbacks
|
||||
|
||||
You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/client::Delegate) to the
|
||||
[Method Builder](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/client::CallBuilder) before making the final `doit()` call.
|
||||
You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/client::Delegate) to the
|
||||
[Method Builder](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/client::CallBuilder) before making the final `doit()` call.
|
||||
Respective methods will be called to provide progress information, as well as determine whether the system should
|
||||
retry on failure.
|
||||
|
||||
The [delegate trait](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/client::Delegate) is default-implemented, allowing you to customize it with minimal effort.
|
||||
The [delegate trait](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/client::Delegate) is default-implemented, allowing you to customize it with minimal effort.
|
||||
|
||||
## Optional Parts in Server-Requests
|
||||
|
||||
All structures provided by this library are made to be [encodable](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/client::RequestValue) and
|
||||
[decodable](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/client::ResponseResult) via *json*. Optionals are used to indicate that partial requests are responses
|
||||
All structures provided by this library are made to be [encodable](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/client::RequestValue) and
|
||||
[decodable](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/client::ResponseResult) via *json*. Optionals are used to indicate that partial requests are responses
|
||||
are valid.
|
||||
Most optionals are are considered [Parts](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/client::Part) which are identifiable by name, which will be sent to
|
||||
Most optionals are are considered [Parts](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/client::Part) which are identifiable by name, which will be sent to
|
||||
the server to indicate either the set parts of the request or the desired parts in the response.
|
||||
|
||||
## Builder Arguments
|
||||
|
||||
Using [method builders](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/client::CallBuilder), you are able to prepare an action call by repeatedly calling it's methods.
|
||||
Using [method builders](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/client::CallBuilder), you are able to prepare an action call by repeatedly calling it's methods.
|
||||
These will always take a single argument, for which the following statements are true.
|
||||
|
||||
* [PODs][wiki-pod] are handed by copy
|
||||
* strings are passed as `&str`
|
||||
* [request values](https://docs.rs/google-drive3/2.0.9+20210322/google_drive3/client::RequestValue) are moved
|
||||
* [request values](https://docs.rs/google-drive3/2.0.10+20210322/google_drive3/client::RequestValue) are moved
|
||||
|
||||
Arguments will always be copied or cloned into the builder, to make them independent of their original life times.
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ impl Default for Scope {
|
||||
/// use drive3::{Result, Error};
|
||||
/// # async fn dox() {
|
||||
/// use std::default::Default;
|
||||
/// use drive3::{DriveHub, oauth2};
|
||||
/// use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// // Get an ApplicationSecret instance by some means. It contains the `client_id` and
|
||||
/// // `client_secret`, among other things.
|
||||
@@ -140,8 +140,8 @@ impl Default for Scope {
|
||||
/// ```
|
||||
#[derive(Clone)]
|
||||
pub struct DriveHub<> {
|
||||
client: hyper::Client<hyper_rustls::HttpsConnector<hyper::client::connect::HttpConnector>, hyper::body::Body>,
|
||||
auth: oauth2::authenticator::Authenticator<hyper_rustls::HttpsConnector<hyper::client::connect::HttpConnector>>,
|
||||
pub client: hyper::Client<hyper_rustls::HttpsConnector<hyper::client::connect::HttpConnector>, hyper::body::Body>,
|
||||
pub auth: oauth2::authenticator::Authenticator<hyper_rustls::HttpsConnector<hyper::client::connect::HttpConnector>>,
|
||||
_user_agent: String,
|
||||
_base_url: String,
|
||||
_root_url: String,
|
||||
@@ -155,7 +155,7 @@ impl<'a, > DriveHub<> {
|
||||
DriveHub {
|
||||
client,
|
||||
auth: authenticator,
|
||||
_user_agent: "google-api-rust-client/2.0.9".to_string(),
|
||||
_user_agent: "google-api-rust-client/2.0.10".to_string(),
|
||||
_base_url: "https://www.googleapis.com/drive/v3/".to_string(),
|
||||
_root_url: "https://www.googleapis.com/".to_string(),
|
||||
}
|
||||
@@ -193,7 +193,7 @@ impl<'a, > DriveHub<> {
|
||||
}
|
||||
|
||||
/// Set the user-agent header field to use in all requests to the server.
|
||||
/// It defaults to `google-api-rust-client/2.0.9`.
|
||||
/// It defaults to `google-api-rust-client/2.0.10`.
|
||||
///
|
||||
/// Returns the previously set user-agent.
|
||||
pub fn user_agent(&mut self, agent_name: String) -> String {
|
||||
@@ -1809,7 +1809,7 @@ impl client::Part for TeamDriveRestrictions {}
|
||||
///
|
||||
/// # async fn dox() {
|
||||
/// use std::default::Default;
|
||||
/// use drive3::{DriveHub, oauth2};
|
||||
/// use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -1862,7 +1862,7 @@ impl<'a> AboutMethods<'a> {
|
||||
///
|
||||
/// # async fn dox() {
|
||||
/// use std::default::Default;
|
||||
/// use drive3::{DriveHub, oauth2};
|
||||
/// use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -1979,7 +1979,7 @@ impl<'a> ChangeMethods<'a> {
|
||||
///
|
||||
/// # async fn dox() {
|
||||
/// use std::default::Default;
|
||||
/// use drive3::{DriveHub, oauth2};
|
||||
/// use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -2037,7 +2037,7 @@ impl<'a> ChannelMethods<'a> {
|
||||
///
|
||||
/// # async fn dox() {
|
||||
/// use std::default::Default;
|
||||
/// use drive3::{DriveHub, oauth2};
|
||||
/// use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -2178,7 +2178,7 @@ impl<'a> CommentMethods<'a> {
|
||||
///
|
||||
/// # async fn dox() {
|
||||
/// use std::default::Default;
|
||||
/// use drive3::{DriveHub, oauth2};
|
||||
/// use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -2343,7 +2343,7 @@ impl<'a> DriveMethods<'a> {
|
||||
///
|
||||
/// # async fn dox() {
|
||||
/// use std::default::Default;
|
||||
/// use drive3::{DriveHub, oauth2};
|
||||
/// use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -2599,7 +2599,7 @@ impl<'a> FileMethods<'a> {
|
||||
///
|
||||
/// # async fn dox() {
|
||||
/// use std::default::Default;
|
||||
/// use drive3::{DriveHub, oauth2};
|
||||
/// use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -2760,7 +2760,7 @@ impl<'a> PermissionMethods<'a> {
|
||||
///
|
||||
/// # async fn dox() {
|
||||
/// use std::default::Default;
|
||||
/// use drive3::{DriveHub, oauth2};
|
||||
/// use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -2910,7 +2910,7 @@ impl<'a> ReplyMethods<'a> {
|
||||
///
|
||||
/// # async fn dox() {
|
||||
/// use std::default::Default;
|
||||
/// use drive3::{DriveHub, oauth2};
|
||||
/// use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -3030,7 +3030,7 @@ impl<'a> RevisionMethods<'a> {
|
||||
///
|
||||
/// # async fn dox() {
|
||||
/// use std::default::Default;
|
||||
/// use drive3::{DriveHub, oauth2};
|
||||
/// use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -3168,7 +3168,7 @@ impl<'a> TeamdriveMethods<'a> {
|
||||
/// # extern crate google_drive3 as drive3;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -3383,7 +3383,7 @@ impl<'a> AboutGetCall<'a> {
|
||||
/// # extern crate google_drive3 as drive3;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -3646,7 +3646,7 @@ impl<'a> ChangeGetStartPageTokenCall<'a> {
|
||||
/// # extern crate google_drive3 as drive3;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -4018,7 +4018,7 @@ impl<'a> ChangeListCall<'a> {
|
||||
/// use drive3::api::Channel;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -4419,7 +4419,7 @@ impl<'a> ChangeWatchCall<'a> {
|
||||
/// use drive3::api::Channel;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -4653,7 +4653,7 @@ impl<'a> ChannelStopCall<'a> {
|
||||
/// use drive3::api::Comment;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -4930,7 +4930,7 @@ impl<'a> CommentCreateCall<'a> {
|
||||
/// # extern crate google_drive3 as drive3;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -5179,7 +5179,7 @@ impl<'a> CommentDeleteCall<'a> {
|
||||
/// # extern crate google_drive3 as drive3;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -5451,7 +5451,7 @@ impl<'a> CommentGetCall<'a> {
|
||||
/// # extern crate google_drive3 as drive3;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -5748,7 +5748,7 @@ impl<'a> CommentListCall<'a> {
|
||||
/// use drive3::api::Comment;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -6038,7 +6038,7 @@ impl<'a> CommentUpdateCall<'a> {
|
||||
/// use drive3::api::Drive;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -6294,7 +6294,7 @@ impl<'a> DriveCreateCall<'a> {
|
||||
/// # extern crate google_drive3 as drive3;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -6531,7 +6531,7 @@ impl<'a> DriveDeleteCall<'a> {
|
||||
/// # extern crate google_drive3 as drive3;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -6791,7 +6791,7 @@ impl<'a> DriveGetCall<'a> {
|
||||
/// # extern crate google_drive3 as drive3;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -7039,7 +7039,7 @@ impl<'a> DriveHideCall<'a> {
|
||||
/// # extern crate google_drive3 as drive3;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -7302,7 +7302,7 @@ impl<'a> DriveListCall<'a> {
|
||||
/// # extern crate google_drive3 as drive3;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -7551,7 +7551,7 @@ impl<'a> DriveUnhideCall<'a> {
|
||||
/// use drive3::api::Drive;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -7841,7 +7841,7 @@ impl<'a> DriveUpdateCall<'a> {
|
||||
/// use drive3::api::File;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -8204,7 +8204,7 @@ impl<'a> FileCopyCall<'a> {
|
||||
/// use std::fs;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -8357,7 +8357,7 @@ impl<'a> FileCreateCall<'a> {
|
||||
upload_url_from_server = false;
|
||||
Ok(hyper::Response::builder()
|
||||
.status(hyper::StatusCode::OK)
|
||||
.header("Localtion", upload_url.as_ref().unwrap().clone())
|
||||
.header("Location", upload_url.as_ref().unwrap().clone())
|
||||
.body(hyper::body::Body::empty())
|
||||
.unwrap())
|
||||
} else {
|
||||
@@ -8657,7 +8657,7 @@ impl<'a> FileCreateCall<'a> {
|
||||
/// # extern crate google_drive3 as drive3;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -8930,7 +8930,7 @@ impl<'a> FileDeleteCall<'a> {
|
||||
/// # extern crate google_drive3 as drive3;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -9149,7 +9149,7 @@ impl<'a> FileEmptyTrashCall<'a> {
|
||||
/// # extern crate google_drive3 as drive3;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -9398,7 +9398,7 @@ impl<'a> FileExportCall<'a> {
|
||||
/// # extern crate google_drive3 as drive3;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -9642,7 +9642,7 @@ impl<'a> FileGenerateIdCall<'a> {
|
||||
/// # extern crate google_drive3 as drive3;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -9954,7 +9954,7 @@ impl<'a> FileGetCall<'a> {
|
||||
/// # extern crate google_drive3 as drive3;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -10339,7 +10339,7 @@ impl<'a> FileListCall<'a> {
|
||||
/// use std::fs;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -10695,7 +10695,7 @@ impl<'a> FileUpdateCall<'a> {
|
||||
upload_url_from_server = false;
|
||||
Ok(hyper::Response::builder()
|
||||
.status(hyper::StatusCode::OK)
|
||||
.header("Localtion", upload_url.as_ref().unwrap().clone())
|
||||
.header("Location", upload_url.as_ref().unwrap().clone())
|
||||
.body(hyper::body::Body::empty())
|
||||
.unwrap())
|
||||
} else {
|
||||
@@ -11018,7 +11018,7 @@ impl<'a> FileUpdateCall<'a> {
|
||||
/// use drive3::api::Channel;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -11360,7 +11360,7 @@ impl<'a> FileWatchCall<'a> {
|
||||
/// use drive3::api::Permission;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -11733,7 +11733,7 @@ impl<'a> PermissionCreateCall<'a> {
|
||||
/// # extern crate google_drive3 as drive3;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -12018,7 +12018,7 @@ impl<'a> PermissionDeleteCall<'a> {
|
||||
/// # extern crate google_drive3 as drive3;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -12314,7 +12314,7 @@ impl<'a> PermissionGetCall<'a> {
|
||||
/// # extern crate google_drive3 as drive3;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -12635,7 +12635,7 @@ impl<'a> PermissionListCall<'a> {
|
||||
/// use drive3::api::Permission;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -12985,7 +12985,7 @@ impl<'a> PermissionUpdateCall<'a> {
|
||||
/// use drive3::api::Reply;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -13274,7 +13274,7 @@ impl<'a> ReplyCreateCall<'a> {
|
||||
/// # extern crate google_drive3 as drive3;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -13535,7 +13535,7 @@ impl<'a> ReplyDeleteCall<'a> {
|
||||
/// # extern crate google_drive3 as drive3;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -13819,7 +13819,7 @@ impl<'a> ReplyGetCall<'a> {
|
||||
/// # extern crate google_drive3 as drive3;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -14116,7 +14116,7 @@ impl<'a> ReplyListCall<'a> {
|
||||
/// use drive3::api::Reply;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -14417,7 +14417,7 @@ impl<'a> ReplyUpdateCall<'a> {
|
||||
/// # extern crate google_drive3 as drive3;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -14671,7 +14671,7 @@ impl<'a> RevisionDeleteCall<'a> {
|
||||
/// # extern crate google_drive3 as drive3;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -14959,7 +14959,7 @@ impl<'a> RevisionGetCall<'a> {
|
||||
/// # extern crate google_drive3 as drive3;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -15232,7 +15232,7 @@ impl<'a> RevisionListCall<'a> {
|
||||
/// use drive3::api::Revision;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -15522,7 +15522,7 @@ impl<'a> RevisionUpdateCall<'a> {
|
||||
/// use drive3::api::TeamDrive;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -15778,7 +15778,7 @@ impl<'a> TeamdriveCreateCall<'a> {
|
||||
/// # extern crate google_drive3 as drive3;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -16015,7 +16015,7 @@ impl<'a> TeamdriveDeleteCall<'a> {
|
||||
/// # extern crate google_drive3 as drive3;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -16275,7 +16275,7 @@ impl<'a> TeamdriveGetCall<'a> {
|
||||
/// # extern crate google_drive3 as drive3;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
@@ -16539,7 +16539,7 @@ impl<'a> TeamdriveListCall<'a> {
|
||||
/// use drive3::api::TeamDrive;
|
||||
/// # async fn dox() {
|
||||
/// # use std::default::Default;
|
||||
/// # use drive3::{DriveHub, oauth2};
|
||||
/// # use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
///
|
||||
/// # let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// # let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// This file was generated automatically from 'src/mako/api/lib.rs.mako'
|
||||
// DO NOT EDIT !
|
||||
|
||||
//! This documentation was generated from *drive* crate version *2.0.9+20210322*, where *20210322* is the exact revision of the *drive:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v2.0.9*.
|
||||
//! This documentation was generated from *drive* crate version *2.0.10+20210322*, where *20210322* is the exact revision of the *drive:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v2.0.10*.
|
||||
//!
|
||||
//! Everything else about the *drive* *v3* API can be found at the
|
||||
//! [official documentation site](https://developers.google.com/drive/).
|
||||
@@ -111,8 +111,6 @@
|
||||
//! ```toml
|
||||
//! [dependencies]
|
||||
//! google-drive3 = "*"
|
||||
//! hyper = "^0.14"
|
||||
//! hyper-rustls = "^0.22"
|
||||
//! serde = "^1.0"
|
||||
//! serde_json = "^1.0"
|
||||
//! ```
|
||||
@@ -126,7 +124,7 @@
|
||||
//! use drive3::{Result, Error};
|
||||
//! # async fn dox() {
|
||||
//! use std::default::Default;
|
||||
//! use drive3::{DriveHub, oauth2};
|
||||
//! use drive3::{DriveHub, oauth2, hyper, hyper_rustls};
|
||||
//!
|
||||
//! // Get an ApplicationSecret instance by some means. It contains the `client_id` and
|
||||
//! // `client_secret`, among other things.
|
||||
@@ -247,7 +245,9 @@
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
|
||||
extern crate hyper;
|
||||
// Re-export the hyper and hyper_rustls crate, they are required to build the hub
|
||||
pub extern crate hyper;
|
||||
pub extern crate hyper_rustls;
|
||||
extern crate serde;
|
||||
extern crate serde_json;
|
||||
// Re-export the yup_oauth2 crate, that is required to call some methods of the hub and the client
|
||||
|
||||
Reference in New Issue
Block a user