Commit Graph

2983 Commits

Author SHA1 Message Date
philippeitis
852bd70ecb Move error checking earlier 2022-10-19 18:42:15 -07:00
philippeitis
83007472c9 Fix stringly typed upload protocol 2022-10-19 18:25:58 -07:00
philippeitis
0ad3b1258f Refactor Params into external struct
Reduces file size of generated library:

```
cargo build --release
   Compiling google-compute1 v5.0.1+20220224 (/home/philippe/PycharmProjects/google-apis-rs/gen/compute1)
    Finished release [optimized] target(s) in 35.15s
```
164 MB resulting lib (4MB reduction)
2022-10-19 17:10:24 -07:00
philippeitis
9fa31bd034 Don't call .to_string() on string values 2022-10-19 15:44:48 -07:00
philippeitis
a6e763f495 Use top-level constants for upload protocols 2022-10-19 15:17:08 -07:00
philippeitis
cfa6958aa0 Add UploadProtocol enum to remove string types 2022-10-19 15:13:20 -07:00
philippeitis
ae3e6a232b Simplify search for alt=json param 2022-10-19 15:00:16 -07:00
philippeitis
eb072087de Use Cow for parameter replacement 2022-10-18 20:04:09 -07:00
philippeitis
925d7b0376 Reduce number of clones 2022-10-18 19:28:48 -07:00
philippeitis
b20e630723 Merge pull request #384 from philippeitis/update-mime
Update mime dependency
2022-10-19 01:05:53 +00:00
philippeitis
f6b195df4f Make MultiPartReader::mime_type associated fn 2022-10-18 16:58:26 -07:00
philippeitis
616b324a77 Update mime 2022-10-18 16:25:08 -07:00
Sebastian Thiel
fb884e193a Merge branch 'auth-refactor' 2022-10-18 15:50:11 +08:00
Sebastian Thiel
0855fc3a28 Also validate crates build without default features
Note that tests can't work without default features as they assume
them to exist, and we have to chose one, going for the one most
users will see.
2022-10-18 15:45:32 +08:00
philippeitis
7a114a6d1c Update documentation 2022-10-16 21:57:25 -07:00
philippeitis
c6439ee165 Remove .expect() 2022-10-16 21:38:06 -07:00
philippeitis
4d30072c91 docs: min 1 try + retries in example 2022-10-16 21:29:10 -07:00
philippeitis
a375b710b1 Use Result<Option<_>, _> 2022-10-16 21:26:21 -07:00
philippeitis
1132b542d2 More correct GetToken docs 2022-10-16 17:28:29 -07:00
philippeitis
02dbcb9782 Fix lib.rs docs 2022-10-16 17:25:46 -07:00
philippeitis
7ca7f1cafd Make yup-oauth2 optional 2022-10-16 17:19:10 -07:00
philippeitis
50dd53a877 Document auth.rs 2022-10-16 17:04:20 -07:00
philippeitis
32110d6970 Return Option<String> from GetToken::get_token instead of Result<...> 2022-10-16 16:35:34 -07:00
Sebastian Thiel
94f4bb3361 marker after releasing drive3 5.0.1 2022-10-16 20:37:50 +08:00
Sebastian Thiel
d75681d4c2 Release google-drive3-cli v5.0.1+20220225 google-drive3-cli-v5.0.1+20220225 2022-10-16 20:36:31 +08:00
Sebastian Thiel
119bb80aa5 Release google-drive3 v5.0.1+20220225 google-drive3-v5.0.1+20220225 2022-10-16 20:35:49 +08:00
Sebastian Thiel
131c59c1e3 regenerate drive3 v5.0.1 2022-10-16 20:35:30 +08:00
Sebastian Thiel
6a4e5c215e bump package patch level (after breaking change, read on)
Version 5.0 already encapsulates a breaking change. However,
it wasn't published except for with a single crate which can
rather be yanked and republished.

We will keep doing this until V5 is stable enough to be published
more widely.
2022-10-16 20:31:18 +08:00
Sebastian Thiel
68f3af5d32 Merge branch 'scopes-fns' 2022-10-16 20:30:41 +08:00
Sebastian Thiel
869a50e64a fix typo 2022-10-16 20:28:47 +08:00
philippeitis
a8d5b2e6d9 Link hub in resource builder docs 2022-10-14 22:41:36 -07:00
philippeitis
3183af080a Refactor modification of scopes
`add_scope` is simplified to simply add scopes, and no longer takes an `Option<_>` item.
Added `add_scopes` convenience function, which allows adding multiple scopes at once.
Added `clear_scopes` function to explicitly allow clearing method scopes.

Refactor modification of scopes

`add_scope` is simplified to simply add scopes, and no longer takes an `Option<_>` item.
Added `add_scopes` convenience function, which allows adding multiple scopes at once.
Added `clear_scopes` function to explicitly allow clearing method scopes.

Refactor modification of scopes

`add_scope` is simplified to simply add scopes, and no longer takes an `Option<_>` item.
Added `add_scopes` convenience function, which allows adding multiple scopes at once.
Added `clear_scopes` function to explicitly allow clearing method scopes.
2022-10-14 22:04:40 -07:00
Sebastian Thiel
79a79ac19d Merge pull request #381 from philippeitis/code-quality
Code quality
2022-10-14 11:06:57 +08:00
philippeitis
24f361749a Use .to_string() directly for reduction in build size
Went from 3,325,128b to 3,287,744b for accessapproval1 by using .to_string() directly, under --release config.
2022-10-10 17:37:16 -07:00
philippeitis
98a02a73a4 Simplify searching for "alt=json" param 2022-10-10 17:14:43 -07:00
philippeitis
d611a319de Fix bug in removing used parameters
The current implementation removes parameters if they are used - however, it only removes the first instance, and removes instances by index. However, when multiple items are being removed, following indices must be decremented by 1 to account for previously removed items.
2022-10-10 17:13:38 -07:00
philippeitis
fa1c5a84ec Use BTreeSet instead of BTreeMap 2022-10-10 17:08:58 -07:00
Sebastian Thiel
44d4bbe65a drive3 api and cli publish markers 2022-10-10 09:36:37 +08:00
Sebastian Thiel
30d9b8bef1 Release google-drive3-cli v5.0.0+20220225 google-drive3-cli-v5.0.0+20220225 2022-10-10 09:36:07 +08:00
Sebastian Thiel
e2b352f40e Release google-drive3 v5.0.0+20220225 google-drive3-v5.0.0+20220225 2022-10-10 09:35:47 +08:00
Sebastian Thiel
25de6be949 cache test runs for faster builds 2022-10-10 09:29:08 +08:00
Sebastian Thiel
7986ffddd4 regenerate drive3 API to pull in the latest google-apis-common crate 2022-10-10 09:26:32 +08:00
Sebastian Thiel
913087c1dc use google-apis-common 5.0 for good measure 2022-10-10 09:25:33 +08:00
Sebastian Thiel
1855e44a95 Release google-apis-common v5.0.0 google-apis-common-v5.0.0 2022-10-10 09:24:40 +08:00
Sebastian Thiel
3625188eb5 feat: apis-common for the 5.0 line of google crates.
It aids with better type decoding support.
2022-10-10 09:23:53 +08:00
Sebastian Thiel
8bb6e2354f prepare drive3 5.0 for release 2022-10-10 09:21:40 +08:00
Sebastian Thiel
4ccf30843b bump build version to 5.0 - better format types
See https://github.com/Byron/google-apis-rs/pull/379 for more
information.
2022-10-10 09:19:46 +08:00
Sebastian Thiel
ed5dab2dbd Merge branch 'format_types' 2022-10-10 09:19:23 +08:00
philippeitis
59874c9c98 Remove indentation 2022-10-10 00:53:24 +00:00
philippeitis
1c04f662d1 Use correct string impls for http headers 2022-10-09 00:04:30 -07:00