commit 5b1e5c2dac6271c10aea4428cf5bf21db16a3721 Author: Bill Thiede Date: Mon Feb 3 17:57:07 2020 -0800 Simple tool for generating google APIs from discovery json. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..5881481 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,1811 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + +[[package]] +name = "adler32" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2" + +[[package]] +name = "aho-corasick" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f56c476256dc249def911d6f7580b5fc7e875895b5d7ee88f5d602208035744" +dependencies = [ + "memchr", +] + +[[package]] +name = "arrayref" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" + +[[package]] +name = "arrayvec" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9" +dependencies = [ + "nodrop", +] + +[[package]] +name = "arrayvec" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" + +[[package]] +name = "autocfg" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" + +[[package]] +name = "autocfg" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" + +[[package]] +name = "backtrace" +version = "0.3.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f80256bc78f67e7df7e36d77366f636ed976895d91fe2ab9efa3973e8fe8c4f" +dependencies = [ + "backtrace-sys", + "cfg-if", + "libc", + "rustc-demangle", +] + +[[package]] +name = "backtrace-sys" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d6575f128516de27e3ce99689419835fce9643a9b215a14d2b5b685be018491" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "base64" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" +dependencies = [ + "byteorder", +] + +[[package]] +name = "base64" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" + +[[package]] +name = "bitflags" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" + +[[package]] +name = "blake2b_simd" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8fb2d74254a3a0b5cac33ac9f8ed0e44aa50378d9dbb2e5d83bd21ed1dc2c8a" +dependencies = [ + "arrayref", + "arrayvec 0.5.1", + "constant_time_eq", +] + +[[package]] +name = "byteorder" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" + +[[package]] +name = "bytes" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" +dependencies = [ + "byteorder", + "either", + "iovec", +] + +[[package]] +name = "c2-chacha" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "214238caa1bf3a496ec3392968969cab8549f96ff30652c9e56885329315f6bb" +dependencies = [ + "ppv-lite86", +] + +[[package]] +name = "cc" +version = "1.0.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd" + +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" + +[[package]] +name = "chrono" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31850b4a4d6bae316f7a09e691c944c28299298837edc0a03f755618c23cbc01" +dependencies = [ + "num-integer", + "num-traits", + "time", +] + +[[package]] +name = "ci_info" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93b085342b4579e6bd92189bb6b832b2fff5564382e2472be42748b630e8063d" +dependencies = [ + "envmnt", +] + +[[package]] +name = "cloudabi" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +dependencies = [ + "bitflags", +] + +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + +[[package]] +name = "cookie" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "888604f00b3db336d2af898ec3c1d5d0ddf5e6d462220f2ededc33a87ac4bbd5" +dependencies = [ + "time", + "url 1.7.2", +] + +[[package]] +name = "cookie_store" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46750b3f362965f197996c4448e4a0935e791bf7d6631bfce9ee0af3d24c919c" +dependencies = [ + "cookie", + "failure", + "idna 0.1.5", + "log", + "publicsuffix", + "serde", + "serde_json", + "time", + "try_from", + "url 1.7.2", +] + +[[package]] +name = "core-foundation" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" + +[[package]] +name = "crc32fast" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-deque" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3aa945d63861bfe624b55d153a39684da1e8c0bc8fba932f7ee3a3c16cea3ca" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils 0.7.0", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5064ebdbf05ce3cb95e45c8b086f72263f4166b29b97f6baff7ef7fe047b55ac" +dependencies = [ + "autocfg 0.1.7", + "cfg-if", + "crossbeam-utils 0.7.0", + "lazy_static", + "memoffset", + "scopeguard", +] + +[[package]] +name = "crossbeam-queue" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" +dependencies = [ + "crossbeam-utils 0.6.6", +] + +[[package]] +name = "crossbeam-utils" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6" +dependencies = [ + "cfg-if", + "lazy_static", +] + +[[package]] +name = "crossbeam-utils" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce446db02cdc3165b94ae73111e570793400d0794e46125cc4056c81cbb039f4" +dependencies = [ + "autocfg 0.1.7", + "cfg-if", + "lazy_static", +] + +[[package]] +name = "dirs" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fd78930633bd1c6e35c4b42b1df7b0cbc6bc191146e512bb3bedf243fcc3901" +dependencies = [ + "libc", + "redox_users", + "winapi 0.3.8", +] + +[[package]] +name = "discovery_parser" +version = "0.1.0" +source = "git+https://github.com/google-apis-rs/generator#7504e310e8c4c361aca998ea14c309d5c46967cc" +dependencies = [ + "serde", +] + +[[package]] +name = "dtoa" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4358a9e11b9a09cf52383b451b49a169e8d797b68aa02301ff586d70d9661ea3" + +[[package]] +name = "either" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" + +[[package]] +name = "encoding_rs" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd8d03faa7fe0c1431609dfad7bbe827af30f82e1e2ae6f7ee4fca6bd764bc28" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "envmnt" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cdd9fdbf10b8cfa59dd70ef823cbaa83e33b86f4ad291ae67b16f4bd37bc69" +dependencies = [ + "indexmap", +] + +[[package]] +name = "error-chain" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ab49e9dcb602294bc42f9a7dfc9bc6e936fca4418ea300dbfb84fe16de0b7d9" +dependencies = [ + "version_check 0.1.5", +] + +[[package]] +name = "failure" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8273f13c977665c5db7eb2b99ae520952fe5ac831ae4cd09d80c4c7042b5ed9" +dependencies = [ + "backtrace", + "failure_derive", +] + +[[package]] +name = "failure_derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bc225b78e0391e4b8683440bf2e63c2deeeb2ce5189eab46e2b68c6d3725d08" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "flate2" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bd6d6f4752952feb71363cffc9ebac9411b75b87c6ab6058c40c8900cf43c0f" +dependencies = [ + "cfg-if", + "crc32fast", + "libc", + "miniz_oxide", +] + +[[package]] +name = "fnv" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "fuchsia-cprng" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" + +[[package]] +name = "fuchsia-zircon" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" +dependencies = [ + "bitflags", + "fuchsia-zircon-sys", +] + +[[package]] +name = "fuchsia-zircon-sys" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" + +[[package]] +name = "futures" +version = "0.1.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b980f2816d6ee8673b6517b52cb0e808a180efc92e5c19d02cdda79066703ef" + +[[package]] +name = "futures-cpupool" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" +dependencies = [ + "futures", + "num_cpus", +] + +[[package]] +name = "getopts" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5" +dependencies = [ + "unicode-width", +] + +[[package]] +name = "getrandom" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "google-api-generator" +version = "0.1.0" +dependencies = [ + "discovery_parser", + "google_rest_api_generator", + "serde", + "serde_json", +] + +[[package]] +name = "google_rest_api_generator" +version = "0.1.0" +source = "git+https://github.com/google-apis-rs/generator#7504e310e8c4c361aca998ea14c309d5c46967cc" +dependencies = [ + "Inflector", + "chrono", + "discovery_parser", + "log", + "percent-encoding 2.1.0", + "proc-macro2", + "pulldown-cmark", + "pulldown-cmark-to-cmark", + "quote", + "reqwest", + "serde", + "serde_json", + "shared", + "syn", + "uri_template_parser", +] + +[[package]] +name = "h2" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462" +dependencies = [ + "byteorder", + "bytes", + "fnv", + "futures", + "http", + "indexmap", + "log", + "slab", + "string", + "tokio-io", +] + +[[package]] +name = "hermit-abi" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eff2656d88f158ce120947499e971d743c05dbcbed62e5bd2f38f1698bbc3772" +dependencies = [ + "libc", +] + +[[package]] +name = "http" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6ccf5ede3a895d8856620237b2f02972c1bbc78d2965ad7fe8838d4a0ed41f0" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6741c859c1b2463a423a1dbce98d418e6c3c3fc720fb0d45528657320920292d" +dependencies = [ + "bytes", + "futures", + "http", + "tokio-buf", +] + +[[package]] +name = "httparse" +version = "1.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" + +[[package]] +name = "hyper" +version = "0.12.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dbe6ed1438e1f8ad955a4701e9a944938e9519f6888d12d8558b645e247d5f6" +dependencies = [ + "bytes", + "futures", + "futures-cpupool", + "h2", + "http", + "http-body", + "httparse", + "iovec", + "itoa", + "log", + "net2", + "rustc_version", + "time", + "tokio", + "tokio-buf", + "tokio-executor", + "tokio-io", + "tokio-reactor", + "tokio-tcp", + "tokio-threadpool", + "tokio-timer", + "want", +] + +[[package]] +name = "hyper-tls" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a800d6aa50af4b5850b2b0f659625ce9504df908e9733b635720483be26174f" +dependencies = [ + "bytes", + "futures", + "hyper", + "native-tls", + "tokio-io", +] + +[[package]] +name = "idna" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" +dependencies = [ + "matches", + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "idna" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" +dependencies = [ + "matches", + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "indexmap" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b54058f0a6ff80b6803da8faf8997cde53872b38f4023728f6830b06cd3c0dc" +dependencies = [ + "autocfg 1.0.0", +] + +[[package]] +name = "iovec" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" +dependencies = [ + "libc", +] + +[[package]] +name = "itoa" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e" + +[[package]] +name = "kernel32-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" +dependencies = [ + "winapi 0.2.8", + "winapi-build", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "lexical-core" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304bccb228c4b020f3a4835d247df0a02a7c4686098d4167762cfbbe4c5cb14" +dependencies = [ + "arrayvec 0.4.12", + "cfg-if", + "rustc_version", + "ryu", + "static_assertions", +] + +[[package]] +name = "libc" +version = "0.2.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558" + +[[package]] +name = "lock_api" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79b2de95ecb4691949fea4716ca53cdbcfccb2c612e19644a8bad05edcf9f47b" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "matches" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" + +[[package]] +name = "maybe-uninit" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" + +[[package]] +name = "memchr" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3197e20c7edb283f87c071ddfc7a2cca8f8e0b888c242959846a6fce03c72223" + +[[package]] +name = "memoffset" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75189eb85871ea5c2e2c15abbdd541185f63b408415e5051f5cac122d8c774b9" +dependencies = [ + "rustc_version", +] + +[[package]] +name = "mime" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" + +[[package]] +name = "mime_guess" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a0ed03949aef72dbdf3116a383d7b38b4768e6f960528cd6a6044aa9ed68599" +dependencies = [ + "mime", + "unicase", +] + +[[package]] +name = "miniz_oxide" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa679ff6578b1cddee93d7e82e263b94a575e0bfced07284eb0c037c1d2416a5" +dependencies = [ + "adler32", +] + +[[package]] +name = "mio" +version = "0.6.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "302dec22bcf6bae6dfb69c647187f4b4d0fb6f535521f7bc022430ce8e12008f" +dependencies = [ + "cfg-if", + "fuchsia-zircon", + "fuchsia-zircon-sys", + "iovec", + "kernel32-sys", + "libc", + "log", + "miow", + "net2", + "slab", + "winapi 0.2.8", +] + +[[package]] +name = "miow" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" +dependencies = [ + "kernel32-sys", + "net2", + "winapi 0.2.8", + "ws2_32-sys", +] + +[[package]] +name = "native-tls" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b2df1a4c22fd44a62147fd8f13dd0f95c9d8ca7b2610299b2a2f9cf8964274e" +dependencies = [ + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "net2" +version = "0.2.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" +dependencies = [ + "cfg-if", + "libc", + "winapi 0.3.8", +] + +[[package]] +name = "nodrop" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" + +[[package]] +name = "nom" +version = "5.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c433f4d505fe6ce7ff78523d2fa13a0b9f2690e181fc26168bcbe5ccc5d14e07" +dependencies = [ + "lexical-core", + "memchr", + "version_check 0.1.5", +] + +[[package]] +name = "num-integer" +version = "0.1.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f6ea62e9d81a77cd3ee9a2a5b9b609447857f3d358704331e4ef39eb247fcba" +dependencies = [ + "autocfg 1.0.0", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" +dependencies = [ + "autocfg 1.0.0", +] + +[[package]] +name = "num_cpus" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46203554f085ff89c235cd12f7075f3233af9b11ed7c9e16dfe2560d03313ce6" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "openssl" +version = "0.10.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e176a45fedd4c990e26580847a525e39e16ec32ac78957dbf62ded31b3abfd6f" +dependencies = [ + "bitflags", + "cfg-if", + "foreign-types", + "lazy_static", + "libc", + "openssl-sys", +] + +[[package]] +name = "openssl-probe" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" + +[[package]] +name = "openssl-sys" +version = "0.9.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1024c0a59774200a555087a6da3f253a9095a5f344e353b212ac4c8b8e450986" +dependencies = [ + "autocfg 1.0.0", + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "parking_lot" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" +dependencies = [ + "lock_api", + "parking_lot_core", + "rustc_version", +] + +[[package]] +name = "parking_lot_core" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" +dependencies = [ + "cfg-if", + "cloudabi", + "libc", + "redox_syscall", + "rustc_version", + "smallvec 0.6.13", + "winapi 0.3.8", +] + +[[package]] +name = "percent-encoding" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" + +[[package]] +name = "percent-encoding" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" + +[[package]] +name = "pkg-config" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" + +[[package]] +name = "ppv-lite86" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" + +[[package]] +name = "proc-macro2" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acb317c6ff86a4e579dfa00fc5e6cca91ecbb4e7eb2df0468805b674eb88548" +dependencies = [ + "unicode-xid", +] + +[[package]] +name = "publicsuffix" +version = "1.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bbaa49075179162b49acac1c6aa45fb4dafb5f13cf6794276d77bc7fd95757b" +dependencies = [ + "error-chain", + "idna 0.2.0", + "lazy_static", + "regex", + "url 2.1.1", +] + +[[package]] +name = "pulldown-cmark" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77043da1282374688ee212dc44b3f37ff929431de9c9adc3053bd3cee5630357" +dependencies = [ + "bitflags", + "getopts", + "memchr", + "unicase", +] + +[[package]] +name = "pulldown-cmark-to-cmark" +version = "1.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f277abcb8c02ab8500efef92338deda868ea8f37010859bcc7bcd258d870a25f" +dependencies = [ + "pulldown-cmark", +] + +[[package]] +name = "quote" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" +dependencies = [ + "autocfg 0.1.7", + "libc", + "rand_chacha 0.1.1", + "rand_core 0.4.2", + "rand_hc 0.1.0", + "rand_isaac", + "rand_jitter", + "rand_os", + "rand_pcg", + "rand_xorshift", + "winapi 0.3.8", +] + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom", + "libc", + "rand_chacha 0.2.1", + "rand_core 0.5.1", + "rand_hc 0.2.0", +] + +[[package]] +name = "rand_chacha" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" +dependencies = [ + "autocfg 0.1.7", + "rand_core 0.3.1", +] + +[[package]] +name = "rand_chacha" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853" +dependencies = [ + "c2-chacha", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_core" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" +dependencies = [ + "rand_core 0.4.2", +] + +[[package]] +name = "rand_core" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rand_hc" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" +dependencies = [ + "rand_core 0.3.1", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_isaac" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" +dependencies = [ + "rand_core 0.3.1", +] + +[[package]] +name = "rand_jitter" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" +dependencies = [ + "libc", + "rand_core 0.4.2", + "winapi 0.3.8", +] + +[[package]] +name = "rand_os" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" +dependencies = [ + "cloudabi", + "fuchsia-cprng", + "libc", + "rand_core 0.4.2", + "rdrand", + "winapi 0.3.8", +] + +[[package]] +name = "rand_pcg" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" +dependencies = [ + "autocfg 0.1.7", + "rand_core 0.4.2", +] + +[[package]] +name = "rand_xorshift" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" +dependencies = [ + "rand_core 0.3.1", +] + +[[package]] +name = "rdrand" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" +dependencies = [ + "rand_core 0.3.1", +] + +[[package]] +name = "redox_syscall" +version = "0.1.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" + +[[package]] +name = "redox_users" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09b23093265f8d200fa7b4c2c76297f47e681c655f6f1285a8780d6a022f7431" +dependencies = [ + "getrandom", + "redox_syscall", + "rust-argon2", +] + +[[package]] +name = "regex" +version = "1.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "322cf97724bea3ee221b78fe25ac9c46114ebb51747ad5babd51a2fc6a8235a8" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", + "thread_local", +] + +[[package]] +name = "regex-syntax" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b28dfe3fe9badec5dbf0a79a9cccad2cfc2ab5484bdb3e44cbd1ae8b3ba2be06" + +[[package]] +name = "remove_dir_all" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" +dependencies = [ + "winapi 0.3.8", +] + +[[package]] +name = "reqwest" +version = "0.9.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f88643aea3c1343c804950d7bf983bd2067f5ab59db6d613a08e05572f2714ab" +dependencies = [ + "base64 0.10.1", + "bytes", + "cookie", + "cookie_store", + "encoding_rs", + "flate2", + "futures", + "http", + "hyper", + "hyper-tls", + "log", + "mime", + "mime_guess", + "native-tls", + "serde", + "serde_json", + "serde_urlencoded", + "time", + "tokio", + "tokio-executor", + "tokio-io", + "tokio-threadpool", + "tokio-timer", + "url 1.7.2", + "uuid", + "winreg", +] + +[[package]] +name = "rust-argon2" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bc8af4bda8e1ff4932523b94d3dd20ee30a87232323eda55903ffd71d2fb017" +dependencies = [ + "base64 0.11.0", + "blake2b_simd", + "constant_time_eq", + "crossbeam-utils 0.7.0", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" + +[[package]] +name = "rustc_version" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +dependencies = [ + "semver", +] + +[[package]] +name = "ryu" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f550b06b6cba9c8b8be3ee73f391990116bf527450d2556e9b9ce263b9a021" +dependencies = [ + "lazy_static", + "winapi 0.3.8", +] + +[[package]] +name = "scopeguard" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" + +[[package]] +name = "security-framework" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ef2429d7cefe5fd28bd1d2ed41c944547d4ff84776f5935b456da44593a16df" +dependencies = [ + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31493fc37615debb8c5090a7aeb4a9730bc61e77ab10b9af59f1a202284f895" +dependencies = [ + "core-foundation-sys", +] + +[[package]] +name = "semver" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver-parser" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" + +[[package]] +name = "serde" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b01d7f0288608a01dca632cf1df859df6fd6ffa885300fc275ce2ba6221953" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "642dd69105886af2efd227f75a520ec9b44a820d65bc133a9131f7d229fd165a" +dependencies = [ + "dtoa", + "itoa", + "serde", + "url 1.7.2", +] + +[[package]] +name = "shared" +version = "0.1.0" +source = "git+https://github.com/google-apis-rs/generator#7504e310e8c4c361aca998ea14c309d5c46967cc" +dependencies = [ + "ci_info", + "discovery_parser", + "failure", + "log", + "serde", + "toolchain_find", +] + +[[package]] +name = "slab" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" + +[[package]] +name = "smallvec" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6" +dependencies = [ + "maybe-uninit", +] + +[[package]] +name = "smallvec" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c2fb2ec9bcd216a5b0d0ccf31ab17b5ed1d627960edff65bbe95d3ce221cefc" + +[[package]] +name = "static_assertions" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f3eb36b47e512f8f1c9e3d10c2c1965bc992bd9cdb024fa581e2194501c83d3" + +[[package]] +name = "string" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d" +dependencies = [ + "bytes", +] + +[[package]] +name = "syn" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af6f3550d8dff9ef7dc34d384ac6f107e5d31c8f57d9f28e0081503f547ac8f5" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "synstructure" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "unicode-xid", +] + +[[package]] +name = "tempfile" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" +dependencies = [ + "cfg-if", + "libc", + "rand 0.7.3", + "redox_syscall", + "remove_dir_all", + "winapi 0.3.8", +] + +[[package]] +name = "thread_local" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "time" +version = "0.1.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" +dependencies = [ + "libc", + "redox_syscall", + "winapi 0.3.8", +] + +[[package]] +name = "tokio" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" +dependencies = [ + "bytes", + "futures", + "mio", + "num_cpus", + "tokio-current-thread", + "tokio-executor", + "tokio-io", + "tokio-reactor", + "tokio-tcp", + "tokio-threadpool", + "tokio-timer", +] + +[[package]] +name = "tokio-buf" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fb220f46c53859a4b7ec083e41dec9778ff0b1851c0942b211edb89e0ccdc46" +dependencies = [ + "bytes", + "either", + "futures", +] + +[[package]] +name = "tokio-current-thread" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d16217cad7f1b840c5a97dfb3c43b0c871fef423a6e8d2118c604e843662a443" +dependencies = [ + "futures", + "tokio-executor", +] + +[[package]] +name = "tokio-executor" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca6df436c42b0c3330a82d855d2ef017cd793090ad550a6bc2184f4b933532ab" +dependencies = [ + "crossbeam-utils 0.6.6", + "futures", +] + +[[package]] +name = "tokio-io" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5090db468dad16e1a7a54c8c67280c5e4b544f3d3e018f0b913b400261f85926" +dependencies = [ + "bytes", + "futures", + "log", +] + +[[package]] +name = "tokio-reactor" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6732fe6b53c8d11178dcb77ac6d9682af27fc6d4cb87789449152e5377377146" +dependencies = [ + "crossbeam-utils 0.6.6", + "futures", + "lazy_static", + "log", + "mio", + "num_cpus", + "parking_lot", + "slab", + "tokio-executor", + "tokio-io", + "tokio-sync", +] + +[[package]] +name = "tokio-sync" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d06554cce1ae4a50f42fba8023918afa931413aded705b560e29600ccf7c6d76" +dependencies = [ + "fnv", + "futures", +] + +[[package]] +name = "tokio-tcp" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d14b10654be682ac43efee27401d792507e30fd8d26389e1da3b185de2e4119" +dependencies = [ + "bytes", + "futures", + "iovec", + "mio", + "tokio-io", + "tokio-reactor", +] + +[[package]] +name = "tokio-threadpool" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0c32ffea4827978e9aa392d2f743d973c1dfa3730a2ed3f22ce1e6984da848c" +dependencies = [ + "crossbeam-deque", + "crossbeam-queue", + "crossbeam-utils 0.6.6", + "futures", + "lazy_static", + "log", + "num_cpus", + "slab", + "tokio-executor", +] + +[[package]] +name = "tokio-timer" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1739638e364e558128461fc1ad84d997702c8e31c2e6b18fb99842268199e827" +dependencies = [ + "crossbeam-utils 0.6.6", + "futures", + "slab", + "tokio-executor", +] + +[[package]] +name = "toolchain_find" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e458af37ead6107144c2e3bb892f605ddfad20251f12143cda8b9c9072b1ca45" +dependencies = [ + "dirs", + "lazy_static", + "regex", + "semver", + "walkdir", +] + +[[package]] +name = "try-lock" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" + +[[package]] +name = "try_from" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "283d3b89e1368717881a9d51dad843cc435380d8109c9e47d38780a324698d8b" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "unicase" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" +dependencies = [ + "version_check 0.9.1", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" +dependencies = [ + "matches", +] + +[[package]] +name = "unicode-normalization" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5479532badd04e128284890390c1e876ef7a993d0570b3597ae43dfa1d59afa4" +dependencies = [ + "smallvec 1.2.0", +] + +[[package]] +name = "unicode-width" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" + +[[package]] +name = "unicode-xid" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" + +[[package]] +name = "uri_template_parser" +version = "0.1.0" +source = "git+https://github.com/google-apis-rs/generator#7504e310e8c4c361aca998ea14c309d5c46967cc" +dependencies = [ + "nom", +] + +[[package]] +name = "url" +version = "1.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" +dependencies = [ + "idna 0.1.5", + "matches", + "percent-encoding 1.0.1", +] + +[[package]] +name = "url" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb" +dependencies = [ + "idna 0.2.0", + "matches", + "percent-encoding 2.1.0", +] + +[[package]] +name = "uuid" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a" +dependencies = [ + "rand 0.6.5", +] + +[[package]] +name = "vcpkg" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168" + +[[package]] +name = "version_check" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" + +[[package]] +name = "version_check" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce" + +[[package]] +name = "walkdir" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" +dependencies = [ + "same-file", + "winapi 0.3.8", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230" +dependencies = [ + "futures", + "log", + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "winapi" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" + +[[package]] +name = "winapi" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-build" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ccfbf554c6ad11084fb7517daca16cfdcaccbdadba4fc336f032a8b12c2ad80" +dependencies = [ + "winapi 0.3.8", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "winreg" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9" +dependencies = [ + "winapi 0.3.8", +] + +[[package]] +name = "ws2_32-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" +dependencies = [ + "winapi 0.2.8", + "winapi-build", +] diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..884619e --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "google-api-generator" +version = "0.1.0" +authors = ["Bill Thiede "] +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +# TODO add 'rev' to pin it. +google_rest_api_generator = { git = "https://github.com/google-apis-rs/generator" } +discovery_parser = { git = "https://github.com/google-apis-rs/generator" } +serde = "1.0" +serde_json = "1.0" diff --git a/photoslibrary.json b/photoslibrary.json new file mode 100644 index 0000000..b5ee463 --- /dev/null +++ b/photoslibrary.json @@ -0,0 +1,1608 @@ +{ + "resources": { + "albums": { + "methods": { + "batchAddMediaItems": { + "response": { + "$ref": "BatchAddMediaItemsToAlbumResponse" + }, + "parameterOrder": [ + "albumId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/photoslibrary", + "https://www.googleapis.com/auth/photoslibrary.appendonly", + "https://www.googleapis.com/auth/photoslibrary.sharing" + ], + "parameters": { + "albumId": { + "pattern": "^[^/]+$", + "location": "path", + "description": "Identifier of the Album that the\nmedia items are added to.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/albums/{albumsId}:batchAddMediaItems", + "path": "v1/albums/{+albumId}:batchAddMediaItems", + "id": "photoslibrary.albums.batchAddMediaItems", + "request": { + "$ref": "BatchAddMediaItemsToAlbumRequest" + }, + "description": "Adds one or more media items in a user's Google Photos library to\nan album. The media items and albums must have been created by the\ndeveloper via the API.\n\nMedia items are added to the end of the album. If multiple media items are\ngiven, they are added in the order specified in this call.\n\nEach album can contain up to 20,000 media items.\n\nOnly media items that are in the user's library can be added to an\nalbum. For albums that are shared, the album must either be owned by the\nuser or the user must have joined the album as a collaborator.\n\nPartial success is not supported. The entire request will fail if an\ninvalid media item or album is specified." + }, + "addEnrichment": { + "flatPath": "v1/albums/{albumsId}:addEnrichment", + "id": "photoslibrary.albums.addEnrichment", + "path": "v1/albums/{+albumId}:addEnrichment", + "description": "Adds an enrichment at a specified position in a defined album.", + "request": { + "$ref": "AddEnrichmentToAlbumRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "albumId" + ], + "response": { + "$ref": "AddEnrichmentToAlbumResponse" + }, + "parameters": { + "albumId": { + "location": "path", + "description": "Identifier of the album where the enrichment is to be added.", + "required": true, + "type": "string", + "pattern": "^[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/photoslibrary", + "https://www.googleapis.com/auth/photoslibrary.appendonly", + "https://www.googleapis.com/auth/photoslibrary.sharing" + ] + }, + "get": { + "response": { + "$ref": "Album" + }, + "parameterOrder": [ + "albumId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/photoslibrary", + "https://www.googleapis.com/auth/photoslibrary.readonly", + "https://www.googleapis.com/auth/photoslibrary.readonly.appcreateddata" + ], + "parameters": { + "albumId": { + "description": "Identifier of the album to be requested.", + "required": true, + "type": "string", + "pattern": "^[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/albums/{albumsId}", + "path": "v1/albums/{+albumId}", + "id": "photoslibrary.albums.get", + "description": "Returns the album based on the specified `albumId`.\nThe `albumId` must be the ID of an album owned by the user or a shared\nalbum that the user has joined." + }, + "unshare": { + "response": { + "$ref": "UnshareAlbumResponse" + }, + "parameterOrder": [ + "albumId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/photoslibrary.sharing" + ], + "parameters": { + "albumId": { + "required": true, + "type": "string", + "pattern": "^[^/]+$", + "location": "path", + "description": "Identifier of the album to be unshared. This album id must belong to an\nalbum created by the developer." + } + }, + "flatPath": "v1/albums/{albumsId}:unshare", + "path": "v1/albums/{+albumId}:unshare", + "id": "photoslibrary.albums.unshare", + "request": { + "$ref": "UnshareAlbumRequest" + }, + "description": "Marks a previously shared album as private. This means that the album is\nno longer shared and all the non-owners will lose access to the album. All\nnon-owner content will be removed from the album. If a non-owner has\npreviously added the album to their library, they will retain all photos in\ntheir library. This action can only be performed on albums which were\ncreated by the developer via the API." + }, + "batchRemoveMediaItems": { + "response": { + "$ref": "BatchRemoveMediaItemsFromAlbumResponse" + }, + "parameterOrder": [ + "albumId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/photoslibrary" + ], + "parameters": { + "albumId": { + "required": true, + "type": "string", + "pattern": "^[^/]+$", + "location": "path", + "description": "Identifier of the Album that the media\nitems are to be removed from." + } + }, + "flatPath": "v1/albums/{albumsId}:batchRemoveMediaItems", + "path": "v1/albums/{+albumId}:batchRemoveMediaItems", + "id": "photoslibrary.albums.batchRemoveMediaItems", + "request": { + "$ref": "BatchRemoveMediaItemsFromAlbumRequest" + }, + "description": "Removes one or more media items from a specified album. The media items and\nthe album must have been created by the developer via the API.\n\nFor albums that are shared, this action is only supported for media items\nthat were added to the album by this user, or for all media items if the\nalbum was created by this user.\n\nPartial success is not supported. The entire request will fail and no\naction will be performed on the album if an invalid media item or album is\nspecified." + }, + "list": { + "description": "Lists all albums shown to a user in the Albums tab of the Google\nPhotos app.", + "response": { + "$ref": "ListAlbumsResponse" + }, + "parameterOrder": [], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/photoslibrary", + "https://www.googleapis.com/auth/photoslibrary.readonly", + "https://www.googleapis.com/auth/photoslibrary.readonly.appcreateddata" + ], + "parameters": { + "pageToken": { + "location": "query", + "description": "A continuation token to get the next page of the results. Adding this to\nthe request returns the rows after the `pageToken`. The `pageToken` should\nbe the value returned in the `nextPageToken` parameter in the response to\nthe `listAlbums` request.", + "type": "string" + }, + "pageSize": { + "location": "query", + "description": "Maximum number of albums to return in the response. Fewer albums might be\nreturned than the specified number. The default `pageSize` is 20, the\nmaximum is 50.", + "format": "int32", + "type": "integer" + }, + "excludeNonAppCreatedData": { + "location": "query", + "description": "If set, the results exclude media items that were not created by this app.\nDefaults to false (all albums are returned). This field is ignored if the\nphotoslibrary.readonly.appcreateddata scope is used.", + "type": "boolean" + } + }, + "flatPath": "v1/albums", + "path": "v1/albums", + "id": "photoslibrary.albums.list" + }, + "create": { + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/photoslibrary", + "https://www.googleapis.com/auth/photoslibrary.appendonly", + "https://www.googleapis.com/auth/photoslibrary.sharing" + ], + "flatPath": "v1/albums", + "id": "photoslibrary.albums.create", + "path": "v1/albums", + "description": "Creates an album in a user's Google Photos library.", + "request": { + "$ref": "CreateAlbumRequest" + }, + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "Album" + } + }, + "share": { + "parameters": { + "albumId": { + "required": true, + "type": "string", + "pattern": "^[^/]+$", + "location": "path", + "description": "Identifier of the album to be shared. This `albumId` must belong to an\nalbum created by the developer." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/photoslibrary.sharing" + ], + "flatPath": "v1/albums/{albumsId}:share", + "id": "photoslibrary.albums.share", + "path": "v1/albums/{+albumId}:share", + "description": "Marks an album as shared and accessible to other users. This action can\nonly be performed on albums which were created by the developer via the\nAPI.", + "request": { + "$ref": "ShareAlbumRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "albumId" + ], + "response": { + "$ref": "ShareAlbumResponse" + } + } + } + }, + "mediaItems": { + "methods": { + "batchGet": { + "description": "Returns the list of media items for the specified media item identifiers.\nItems are returned in the same order as the supplied identifiers.", + "httpMethod": "GET", + "response": { + "$ref": "BatchGetMediaItemsResponse" + }, + "parameterOrder": [], + "parameters": { + "mediaItemIds": { + "type": "string", + "repeated": true, + "location": "query", + "description": "Identifiers of the media items to be requested.\nMust not contain repeated identifiers and cannot be empty. The maximum\nnumber of media items that can be retrieved in one call is 50." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/photoslibrary", + "https://www.googleapis.com/auth/photoslibrary.readonly", + "https://www.googleapis.com/auth/photoslibrary.readonly.appcreateddata" + ], + "flatPath": "v1/mediaItems:batchGet", + "id": "photoslibrary.mediaItems.batchGet", + "path": "v1/mediaItems:batchGet" + }, + "search": { + "response": { + "$ref": "SearchMediaItemsResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/photoslibrary", + "https://www.googleapis.com/auth/photoslibrary.readonly", + "https://www.googleapis.com/auth/photoslibrary.readonly.appcreateddata" + ], + "parameters": {}, + "flatPath": "v1/mediaItems:search", + "path": "v1/mediaItems:search", + "id": "photoslibrary.mediaItems.search", + "request": { + "$ref": "SearchMediaItemsRequest" + }, + "description": "Searches for media items in a user's Google Photos library.\nIf no filters are set, then all media items in the user's library are\nreturned.\nIf an album is set, all media items in the specified album are returned.\nIf filters are specified, media items that match the filters from the\nuser's library are listed. If you set both the album and the filters, the\nrequest results in an error." + }, + "list": { + "scopes": [ + "https://www.googleapis.com/auth/photoslibrary", + "https://www.googleapis.com/auth/photoslibrary.readonly", + "https://www.googleapis.com/auth/photoslibrary.readonly.appcreateddata" + ], + "parameters": { + "pageToken": { + "description": "A continuation token to get the next page of the results. Adding this to\nthe request returns the rows after the `pageToken`. The `pageToken` should\nbe the value returned in the `nextPageToken` parameter in the response to\nthe `listMediaItems` request.", + "type": "string", + "location": "query" + }, + "pageSize": { + "type": "integer", + "location": "query", + "description": "Maximum number of media items to return in the response. Fewer media items\nmight be returned than the specified number. The default `pageSize` is 25,\nthe maximum is 100.", + "format": "int32" + } + }, + "flatPath": "v1/mediaItems", + "path": "v1/mediaItems", + "id": "photoslibrary.mediaItems.list", + "description": "List all media items from a user's Google Photos library.", + "response": { + "$ref": "ListMediaItemsResponse" + }, + "parameterOrder": [], + "httpMethod": "GET" + }, + "get": { + "flatPath": "v1/mediaItems/{mediaItemsId}", + "path": "v1/mediaItems/{+mediaItemId}", + "id": "photoslibrary.mediaItems.get", + "description": "Returns the media item for the specified media item identifier.", + "response": { + "$ref": "MediaItem" + }, + "parameterOrder": [ + "mediaItemId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/photoslibrary", + "https://www.googleapis.com/auth/photoslibrary.readonly", + "https://www.googleapis.com/auth/photoslibrary.readonly.appcreateddata" + ], + "parameters": { + "mediaItemId": { + "required": true, + "type": "string", + "pattern": "^[^/]+$", + "location": "path", + "description": "Identifier of the media item to be requested." + } + } + }, + "batchCreate": { + "flatPath": "v1/mediaItems:batchCreate", + "path": "v1/mediaItems:batchCreate", + "id": "photoslibrary.mediaItems.batchCreate", + "description": "Creates one or more media items in a user's Google Photos library.\n\nThis is the second step for creating a media item. For details regarding\nStep 1, uploading the raw bytes to a Google Server, see\n\u003ca href=\"/photos/library/guides/upload-media\"\u003eUploading media\u003c/a\u003e.\n\nThis call adds the media item to the library. If an album `id` is\nspecified, the call adds the media item to the album too. Each album can\ncontain up to 20,000 media items. By default, the media item will be added\nto the end of the library or album.\n\nIf an album `id` and position are both defined, the media item is\nadded to the album at the specified position.\n\nIf the call contains multiple media items, they're added at the specified\nposition.\nIf you are creating a media item in a shared album where you are not the\nowner, you are not allowed to position the media item. Doing so will result\nin a `BAD REQUEST` error.", + "request": { + "$ref": "BatchCreateMediaItemsRequest" + }, + "response": { + "$ref": "BatchCreateMediaItemsResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/photoslibrary", + "https://www.googleapis.com/auth/photoslibrary.appendonly", + "https://www.googleapis.com/auth/photoslibrary.sharing" + ] + } + } + }, + "sharedAlbums": { + "methods": { + "leave": { + "response": { + "$ref": "LeaveSharedAlbumResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/photoslibrary.sharing" + ], + "parameters": {}, + "flatPath": "v1/sharedAlbums:leave", + "path": "v1/sharedAlbums:leave", + "id": "photoslibrary.sharedAlbums.leave", + "request": { + "$ref": "LeaveSharedAlbumRequest" + }, + "description": "Leaves a previously-joined shared album on behalf of the Google Photos\nuser. The user must not own this album." + }, + "get": { + "parameters": { + "shareToken": { + "description": "Share token of the album to be requested.", + "required": true, + "type": "string", + "pattern": "^[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/photoslibrary.sharing" + ], + "flatPath": "v1/sharedAlbums/{sharedAlbumsId}", + "id": "photoslibrary.sharedAlbums.get", + "path": "v1/sharedAlbums/{+shareToken}", + "description": "Returns the album based on the specified `shareToken`.", + "httpMethod": "GET", + "parameterOrder": [ + "shareToken" + ], + "response": { + "$ref": "Album" + } + }, + "list": { + "flatPath": "v1/sharedAlbums", + "path": "v1/sharedAlbums", + "id": "photoslibrary.sharedAlbums.list", + "description": "Lists all shared albums available in the Sharing tab of the\nuser's Google Photos app.", + "response": { + "$ref": "ListSharedAlbumsResponse" + }, + "parameterOrder": [], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/photoslibrary", + "https://www.googleapis.com/auth/photoslibrary.readonly", + "https://www.googleapis.com/auth/photoslibrary.readonly.appcreateddata" + ], + "parameters": { + "pageToken": { + "location": "query", + "description": "A continuation token to get the next page of the results. Adding this to\nthe request returns the rows after the `pageToken`. The `pageToken` should\nbe the value returned in the `nextPageToken` parameter in the response to\nthe `listSharedAlbums` request.", + "type": "string" + }, + "pageSize": { + "type": "integer", + "location": "query", + "description": "Maximum number of albums to return in the response. Fewer albums might be\nreturned than the specified number. The default `pageSize` is 20, the\nmaximum is 50.", + "format": "int32" + }, + "excludeNonAppCreatedData": { + "type": "boolean", + "location": "query", + "description": "If set, the results exclude media items that were not created by this app.\nDefaults to false (all albums are returned). This field is ignored if the\nphotoslibrary.readonly.appcreateddata scope is used." + } + } + }, + "join": { + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/photoslibrary.sharing" + ], + "flatPath": "v1/sharedAlbums:join", + "path": "v1/sharedAlbums:join", + "id": "photoslibrary.sharedAlbums.join", + "description": "Joins a shared album on behalf of the Google Photos user.", + "request": { + "$ref": "JoinSharedAlbumRequest" + }, + "response": { + "$ref": "JoinSharedAlbumResponse" + }, + "parameterOrder": [], + "httpMethod": "POST" + } + } + } + }, + "parameters": { + "key": { + "location": "query", + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "type": "string" + }, + "access_token": { + "type": "string", + "location": "query", + "description": "OAuth access token." + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "type": "string", + "location": "query" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "$.xgafv": { + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format." + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json" + } + }, + "version": "v1", + "baseUrl": "https://photoslibrary.googleapis.com/", + "servicePath": "", + "description": "Manage photos, videos, and albums in Google Photos\n", + "kind": "discovery#restDescription", + "basePath": "", + "revision": "20200203", + "documentationLink": "https://developers.google.com/photos/", + "id": "photoslibrary:v1", + "discoveryVersion": "v1", + "version_module": true, + "schemas": { + "MediaMetadata": { + "type": "object", + "properties": { + "height": { + "description": "Original height (in pixels) of the media item.", + "format": "int64", + "type": "string" + }, + "photo": { + "description": "Metadata for a photo media type.", + "$ref": "Photo" + }, + "video": { + "$ref": "Video", + "description": "Metadata for a video media type." + }, + "width": { + "description": "Original width (in pixels) of the media item.", + "format": "int64", + "type": "string" + }, + "creationTime": { + "description": "Time when the media item was first created (not when it was uploaded to\nGoogle Photos).", + "format": "google-datetime", + "type": "string" + } + }, + "id": "MediaMetadata", + "description": "Metadata for a media item." + }, + "Location": { + "description": "Represents a physical location.", + "type": "object", + "properties": { + "latlng": { + "$ref": "LatLng", + "description": "Position of the location on the map." + }, + "locationName": { + "description": "Name of the location to be displayed.", + "type": "string" + } + }, + "id": "Location" + }, + "BatchGetMediaItemsResponse": { + "type": "object", + "properties": { + "mediaItemResults": { + "description": "Output only. List of media items retrieved.\nNote that even if the call to BatchGetMediaItems succeeds, there may have\nbeen failures for some media items in the batch. These failures are\nindicated in each\nMediaItemResult.status.", + "type": "array", + "items": { + "$ref": "MediaItemResult" + } + } + }, + "id": "BatchGetMediaItemsResponse", + "description": "Response to retrieve a list of media items." + }, + "ListSharedAlbumsResponse": { + "type": "object", + "properties": { + "sharedAlbums": { + "description": "Output only. List of shared albums.", + "type": "array", + "items": { + "$ref": "Album" + } + }, + "nextPageToken": { + "description": "Output only. Token to use to get the next set of shared albums. Populated\nif there are more shared albums to retrieve for this request.", + "type": "string" + } + }, + "id": "ListSharedAlbumsResponse", + "description": "List of shared albums requested." + }, + "FeatureFilter": { + "description": "This filter defines the features that the media items should have.", + "type": "object", + "properties": { + "includedFeatures": { + "description": "The set of features to be included in the media item search results.\nThe items in the set are ORed and may match any of the specified features.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "NONE", + "FAVORITES" + ] + }, + "enumDescriptions": [ + "Treated as if no filters are applied. All features are included.", + "Media items that the user has marked as favorites in the Google Photos\napp." + ] + } + }, + "id": "FeatureFilter" + }, + "SimpleMediaItem": { + "description": "A simple media item to be created in Google Photos via an upload token.", + "type": "object", + "properties": { + "fileName": { + "description": "File name with extension of the media item. This is shown to the user in\nGoogle Photos. The file name specified during the \u003ca\nhref=\"https://developers.google.com/photos/library/guides/upload-media\"\u003ebyte\nupload process\u003c/a\u003e is ignored if this field is set. The file name,\nincluding the file extension, shouldn't be more than 255 characters. This\nis an optional field.", + "type": "string" + }, + "uploadToken": { + "description": "Token identifying the media bytes that have been uploaded to Google.", + "type": "string" + } + }, + "id": "SimpleMediaItem" + }, + "ContributorInfo": { + "type": "object", + "properties": { + "profilePictureBaseUrl": { + "type": "string", + "description": "URL to the profile picture of the contributor." + }, + "displayName": { + "description": "Display name of the contributor.", + "type": "string" + } + }, + "id": "ContributorInfo", + "description": "Information about the user who added the media item. Note that this\ninformation is included only if the media item is within a shared album\ncreated by your app and you have the sharing scope." + }, + "ShareAlbumRequest": { + "type": "object", + "properties": { + "sharedAlbumOptions": { + "$ref": "SharedAlbumOptions", + "description": "Options to be set when converting the album to a shared album." + } + }, + "id": "ShareAlbumRequest", + "description": "Request to make an album shared in Google Photos." + }, + "BatchCreateMediaItemsRequest": { + "description": "Request to create one or more media items in a user's Google Photos library.\nIf an `albumid` is specified, the media items are also added to that album.\n`albumPosition` is optional and can only be specified if an `albumId` is set.", + "type": "object", + "properties": { + "albumPosition": { + "$ref": "AlbumPosition", + "description": "Position in the album where the media items are added. If not\nspecified, the media items are added to the end of the album (as per\nthe default value, that is, `LAST_IN_ALBUM`). The request fails if this\nfield is set and the `albumId` is not specified. The request will also fail\nif you set the field and are not the owner of the shared album." + }, + "albumId": { + "description": "Identifier of the album where the media items are added. The media items\nare also added to the user's library. This is an optional field.", + "type": "string" + }, + "newMediaItems": { + "description": "List of media items to be created.", + "type": "array", + "items": { + "$ref": "NewMediaItem" + } + } + }, + "id": "BatchCreateMediaItemsRequest" + }, + "BatchAddMediaItemsToAlbumRequest": { + "type": "object", + "properties": { + "mediaItemIds": { + "description": "Identifiers of the MediaItems to be\nadded.\nThe maximum number of media items that can be added in one call is 50.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "BatchAddMediaItemsToAlbumRequest", + "description": "Request to add media items to an album." + }, + "MediaTypeFilter": { + "id": "MediaTypeFilter", + "description": "This filter defines the type of media items to be returned, for example,\nvideos or photos. All the specified media types are treated as an OR when\nused together.", + "type": "object", + "properties": { + "mediaTypes": { + "enumDescriptions": [ + "Treated as if no filters are applied. All media types are included.", + "All media items that are considered videos.\nThis also includes movies the user has created using the Google Photos\napp.", + "All media items that are considered photos. This includes .bmp, .gif,\n.ico, .jpg (and other spellings), .tiff, .webp and special photo types\nsuch as iOS live photos, Android motion photos, panoramas, photospheres." + ], + "description": "The types of media items to be included. This field should be populated\nwith only one media type. If you specify multiple media types, it results\nin an error.", + "type": "array", + "items": { + "enum": [ + "ALL_MEDIA", + "VIDEO", + "PHOTO" + ], + "type": "string" + } + } + } + }, + "SearchMediaItemsResponse": { + "id": "SearchMediaItemsResponse", + "description": "List of media items that match the search parameters.", + "type": "object", + "properties": { + "mediaItems": { + "type": "array", + "items": { + "$ref": "MediaItem" + }, + "description": "Output only. List of media items that match the search parameters." + }, + "nextPageToken": { + "description": "Output only. Use this token to get the next set of media items. Its\npresence is the only reliable indicator of more media items being available\nin the next request.", + "type": "string" + } + } + }, + "BatchAddMediaItemsToAlbumResponse": { + "id": "BatchAddMediaItemsToAlbumResponse", + "description": "Response for adding media items to an album.", + "type": "object", + "properties": {} + }, + "NewEnrichmentItem": { + "description": "A new enrichment item to be added to an album, used by the\n`albums.addEnrichment` call.", + "type": "object", + "properties": { + "textEnrichment": { + "$ref": "TextEnrichment", + "description": "Text to be added to the album." + }, + "locationEnrichment": { + "description": "Location to be added to the album.", + "$ref": "LocationEnrichment" + }, + "mapEnrichment": { + "$ref": "MapEnrichment", + "description": "Map to be added to the album." + } + }, + "id": "NewEnrichmentItem" + }, + "AlbumPosition": { + "id": "AlbumPosition", + "description": "Specifies a position in an album.", + "type": "object", + "properties": { + "relativeMediaItemId": { + "type": "string", + "description": "The media item to which the position is relative to.\nOnly used when position type is AFTER_MEDIA_ITEM." + }, + "position": { + "description": "Type of position, for a media or enrichment item.", + "type": "string", + "enumDescriptions": [ + "Default value if this enum isn't set.", + "At the beginning of the album.", + "At the end of the album.", + "After a media item.", + "After an enrichment item." + ], + "enum": [ + "POSITION_TYPE_UNSPECIFIED", + "FIRST_IN_ALBUM", + "LAST_IN_ALBUM", + "AFTER_MEDIA_ITEM", + "AFTER_ENRICHMENT_ITEM" + ] + }, + "relativeEnrichmentItemId": { + "type": "string", + "description": "The enrichment item to which the position is relative to.\nOnly used when position type is AFTER_ENRICHMENT_ITEM." + } + } + }, + "ListMediaItemsResponse": { + "type": "object", + "properties": { + "nextPageToken": { + "description": "Output only. Token to use to get the next set of media items. Its presence\nis the only reliable indicator of more media items being available in the\nnext request.", + "type": "string" + }, + "mediaItems": { + "description": "Output only. List of media items in the user's library.", + "type": "array", + "items": { + "$ref": "MediaItem" + } + } + }, + "id": "ListMediaItemsResponse", + "description": "List of all media items from the user's Google Photos library." + }, + "LatLng": { + "id": "LatLng", + "description": "An object representing a latitude/longitude pair. This is expressed as a pair\nof doubles representing degrees latitude and degrees longitude. Unless\nspecified otherwise, this must conform to the\n\u003ca href=\"http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf\"\u003eWGS84\nstandard\u003c/a\u003e. Values must be within normalized ranges.", + "type": "object", + "properties": { + "latitude": { + "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].", + "format": "double", + "type": "number" + }, + "longitude": { + "type": "number", + "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].", + "format": "double" + } + } + }, + "ShareInfo": { + "type": "object", + "properties": { + "isOwned": { + "description": "True if the user owns the album.", + "type": "boolean" + }, + "isJoined": { + "description": "True if the user has joined the album. This is always true for the owner\nof the shared album.", + "type": "boolean" + }, + "sharedAlbumOptions": { + "$ref": "SharedAlbumOptions", + "description": "Options that control the sharing of an album." + }, + "shareableUrl": { + "description": "A link to the album that's now shared on the Google Photos website and app.\nAnyone with the link can access this shared album and see all of the items\npresent in the album.", + "type": "string" + }, + "shareToken": { + "type": "string", + "description": "A token that can be used by other users to join this shared album via the\nAPI." + } + }, + "id": "ShareInfo", + "description": "Information about albums that are shared. This information is only included\nif you created the album, it is shared and you have the sharing scope." + }, + "Album": { + "type": "object", + "properties": { + "id": { + "description": "[Ouput only] Identifier for the album. This is a persistent identifier that\ncan be used between sessions to identify this album.", + "type": "string" + }, + "productUrl": { + "description": "[Output only] Google Photos URL for the album. The user needs to be signed\nin to their Google Photos account to access this link.", + "type": "string" + }, + "shareInfo": { + "$ref": "ShareInfo", + "description": "[Output only] Information related to shared albums.\nThis field is only populated if the album is a shared album, the\ndeveloper created the album and the user has granted the\n`photoslibrary.sharing` scope." + }, + "mediaItemsCount": { + "type": "string", + "description": "[Output only] The number of media items in the album.", + "format": "int64" + }, + "title": { + "description": "Name of the album displayed to the user in their Google Photos account.\nThis string shouldn't be more than 500 characters.", + "type": "string" + }, + "coverPhotoBaseUrl": { + "type": "string", + "description": "[Output only] A URL to the cover photo's bytes. This shouldn't be used as\nis. Parameters should be appended to this URL before use. See the\n[developer\ndocumentation](https://developers.google.com/photos/library/guides/access-media-items#base-urls)\nfor a complete list of supported parameters. For example,\n`'=w2048-h1024'` sets the dimensions of the cover photo to have a width of\n2048 px and height of 1024 px." + }, + "isWriteable": { + "description": "[Output only] True if you can create media items in this album.\nThis field is based on the scopes granted and permissions of the album. If\nthe scopes are changed or permissions of the album are changed, this field\nis updated.", + "type": "boolean" + }, + "coverPhotoMediaItemId": { + "type": "string", + "description": "Identifier for the media item associated with the cover photo." + } + }, + "id": "Album", + "description": "Representation of an album in Google Photos.\nAlbums are containers for media items. If an album has been shared by the\napplication, it contains an extra `shareInfo` property." + }, + "TextEnrichment": { + "id": "TextEnrichment", + "description": "An enrichment containing text.", + "type": "object", + "properties": { + "text": { + "description": "Text for this enrichment item.", + "type": "string" + } + } + }, + "ShareAlbumResponse": { + "description": "Response to successfully sharing an album.", + "type": "object", + "properties": { + "shareInfo": { + "description": "Output only. Information about the shared album.", + "$ref": "ShareInfo" + } + }, + "id": "ShareAlbumResponse" + }, + "Date": { + "description": "Represents a whole calendar date. Set `day` to 0 when only the month and year are significant, for example, all of December 2018. Set `day` and `month` to 0 if only the year is significant, for example, the entire of 2018. Set `year` to 0 when only the day and month are significant, for example, an anniversary or birthday.\n\nUnsupported: Setting all values to 0, only `month` to 0, or both `day` and `year` to 0 at the same time.", + "type": "object", + "properties": { + "year": { + "description": "Year of date. Must be from 1 to 9999, or 0 if specifying a date without\na year.", + "format": "int32", + "type": "integer" + }, + "day": { + "description": "Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year/month where the day isn't significant.", + "format": "int32", + "type": "integer" + }, + "month": { + "description": "Month of year. Must be from 1 to 12, or 0 if specifying a year without a\nmonth and day.", + "format": "int32", + "type": "integer" + } + }, + "id": "Date" + }, + "Filters": { + "description": "Filters that can be applied to a media item search.\nIf multiple filter options are specified, they're treated as AND with each\nother.", + "type": "object", + "properties": { + "excludeNonAppCreatedData": { + "description": "If set, the results exclude media items that were not created by this app.\nDefaults to false (all media items are returned). This field is ignored if\nthe photoslibrary.readonly.appcreateddata scope is used.", + "type": "boolean" + }, + "dateFilter": { + "description": "Filters the media items based on their creation date.", + "$ref": "DateFilter" + }, + "includeArchivedMedia": { + "description": "If set, the results include media items that the user has archived.\nDefaults to false (archived media items aren't included).", + "type": "boolean" + }, + "mediaTypeFilter": { + "description": "Filters the media items based on the type of media.", + "$ref": "MediaTypeFilter" + }, + "featureFilter": { + "$ref": "FeatureFilter", + "description": "Filters the media items based on their features." + }, + "contentFilter": { + "$ref": "ContentFilter", + "description": "Filters the media items based on their content." + } + }, + "id": "Filters" + }, + "BatchRemoveMediaItemsFromAlbumResponse": { + "description": "Response for successfully removing all specified media items from the album.", + "type": "object", + "properties": {}, + "id": "BatchRemoveMediaItemsFromAlbumResponse" + }, + "SearchMediaItemsRequest": { + "description": "Request to search for media items in a user's library.\n\nIf the album id is specified, this call will return the list of media items\nin the album. If neither filters nor album id are\nspecified, this call will return all media items in a user's Google Photos\nlibrary.\n\nIf filters are specified, this call will return all media items in\nthe user's library that fulfill the filter criteria.\n\nFilters and album id must not both be set, as this will result in an\ninvalid request.", + "type": "object", + "properties": { + "filters": { + "$ref": "Filters", + "description": "Filters to apply to the request. Can't be set in conjunction with an\n`albumId`." + }, + "pageToken": { + "description": "A continuation token to get the next page of the results. Adding this to\nthe request returns the rows after the `pageToken`. The `pageToken` should\nbe the value returned in the `nextPageToken` parameter in the response to\nthe `searchMediaItems` request.", + "type": "string" + }, + "albumId": { + "description": "Identifier of an album. If populated, lists all media items in\nspecified album. Can't set in conjunction with any filters.", + "type": "string" + }, + "pageSize": { + "description": "Maximum number of media items to return in the response. Fewer media items\nmight be returned than the specified number. The default `pageSize` is 25,\nthe maximum is 100.", + "format": "int32", + "type": "integer" + } + }, + "id": "SearchMediaItemsRequest" + }, + "LeaveSharedAlbumRequest": { + "description": "Request to leave a shared album on behalf of the user. This uses a shareToken\nwhich can be acquired via the or listSharedAlbums or getAlbum calls.", + "type": "object", + "properties": { + "shareToken": { + "description": "Token to leave the shared album on behalf of the user.", + "type": "string" + } + }, + "id": "LeaveSharedAlbumRequest" + }, + "Video": { + "id": "Video", + "description": "Metadata that is specific to a video, for example, fps and processing status.\nSome of these fields may be null or not included.", + "type": "object", + "properties": { + "fps": { + "description": "Frame rate of the video.", + "format": "double", + "type": "number" + }, + "cameraModel": { + "description": "Model of the camera with which the video was taken.", + "type": "string" + }, + "status": { + "type": "string", + "enumDescriptions": [ + "Video processing status is unknown.", + "Video is being processed. The user sees an icon for this\nvideo in the Google Photos app; however, it isn't playable yet.", + "Video processing is complete and it is now ready for viewing.", + "Something has gone wrong and the video has failed to process." + ], + "enum": [ + "UNSPECIFIED", + "PROCESSING", + "READY", + "FAILED" + ], + "description": "Processing status of the video." + }, + "cameraMake": { + "description": "Brand of the camera with which the video was taken.", + "type": "string" + } + } + }, + "DateFilter": { + "type": "object", + "properties": { + "dates": { + "description": "List of dates that match the media items' creation date. A maximum of\n5 dates can be included per request.", + "type": "array", + "items": { + "$ref": "Date" + } + }, + "ranges": { + "description": "List of dates ranges that match the media items' creation date. A\nmaximum of 5 dates ranges can be included per request.", + "type": "array", + "items": { + "$ref": "DateRange" + } + } + }, + "id": "DateFilter", + "description": "This filter defines the allowed dates or date ranges for the media returned.\nIt's possible to pick a set of specific dates and a set of date ranges." + }, + "NewMediaItemResult": { + "description": "Result of creating a new media item.", + "type": "object", + "properties": { + "uploadToken": { + "description": "The upload token used to create this new media item.", + "type": "string" + }, + "status": { + "$ref": "Status", + "description": "If an error occurred during the creation of this media item, this field\nis populated with information related to the error. For details regarding\nthis field, see \u003ca href=\"#Status\"\u003eStatus\u003c/a\u003e." + }, + "mediaItem": { + "$ref": "MediaItem", + "description": "Media item created with the upload token. It's populated if no errors\noccurred and the media item was created successfully." + } + }, + "id": "NewMediaItemResult" + }, + "ListAlbumsResponse": { + "type": "object", + "properties": { + "albums": { + "description": "Output only. List of albums shown in the Albums tab of the user's Google\nPhotos app.", + "type": "array", + "items": { + "$ref": "Album" + } + }, + "nextPageToken": { + "description": "Output only. Token to use to get the next set of albums. Populated if\nthere are more albums to retrieve for this request.", + "type": "string" + } + }, + "id": "ListAlbumsResponse", + "description": "List of albums requested." + }, + "CreateAlbumRequest": { + "id": "CreateAlbumRequest", + "description": "Request to create an album in Google Photos.", + "type": "object", + "properties": { + "album": { + "$ref": "Album", + "description": "The album to be created." + } + } + }, + "AddEnrichmentToAlbumResponse": { + "description": "The enrichment item that's created.", + "type": "object", + "properties": { + "enrichmentItem": { + "$ref": "EnrichmentItem", + "description": "Output only. Enrichment which was added." + } + }, + "id": "AddEnrichmentToAlbumResponse" + }, + "JoinSharedAlbumResponse": { + "id": "JoinSharedAlbumResponse", + "description": "Response to successfully joining the shared album on behalf of the user.", + "type": "object", + "properties": { + "album": { + "$ref": "Album", + "description": "Shared album that the user has joined." + } + } + }, + "Photo": { + "description": "Metadata that is specific to a photo, such as, ISO, focal length and\nexposure time. Some of these fields may be null or not included.", + "type": "object", + "properties": { + "exposureTime": { + "description": "Exposure time of the camera aperture when the photo was taken.", + "format": "google-duration", + "type": "string" + }, + "cameraModel": { + "description": "Model of the camera with which the photo was taken.", + "type": "string" + }, + "cameraMake": { + "description": "Brand of the camera with which the photo was taken.", + "type": "string" + }, + "focalLength": { + "description": "Focal length of the camera lens with which the photo was taken.", + "format": "float", + "type": "number" + }, + "isoEquivalent": { + "type": "integer", + "description": "ISO of the camera with which the photo was taken.", + "format": "int32" + }, + "apertureFNumber": { + "type": "number", + "description": "Aperture f number of the camera lens with which the photo was taken.", + "format": "float" + } + }, + "id": "Photo" + }, + "EnrichmentItem": { + "description": "An enrichment item.", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Identifier of the enrichment item." + } + }, + "id": "EnrichmentItem" + }, + "MapEnrichment": { + "description": "An enrichment containing a map, showing origin and destination locations.", + "type": "object", + "properties": { + "destination": { + "description": "Destination location for this enrichemt item.", + "$ref": "Location" + }, + "origin": { + "$ref": "Location", + "description": "Origin location for this enrichment item." + } + }, + "id": "MapEnrichment" + }, + "AddEnrichmentToAlbumRequest": { + "type": "object", + "properties": { + "albumPosition": { + "$ref": "AlbumPosition", + "description": "The position in the album where the enrichment is to be inserted." + }, + "newEnrichmentItem": { + "$ref": "NewEnrichmentItem", + "description": "The enrichment to be added." + } + }, + "id": "AddEnrichmentToAlbumRequest", + "description": "Request to add an enrichment to a specific album at a specific position." + }, + "DateRange": { + "description": "Defines a range of dates. Both dates must be of the same format. For more\ninformation, see Date.", + "type": "object", + "properties": { + "endDate": { + "$ref": "Date", + "description": "The end date (included as part of the range). It must be specified in the\nsame format as the start date." + }, + "startDate": { + "$ref": "Date", + "description": "The start date (included as part of the range) in one of the formats\ndescribed." + } + }, + "id": "DateRange" + }, + "BatchRemoveMediaItemsFromAlbumRequest": { + "description": "Request to remove a list of media items from an album.", + "type": "object", + "properties": { + "mediaItemIds": { + "description": "Identifiers of the MediaItems to be\nremoved.\n\nMust not contain repeated identifiers and cannot be empty. The maximum\nnumber of media items that can be removed in one call is 50.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "BatchRemoveMediaItemsFromAlbumRequest" + }, + "NewMediaItem": { + "type": "object", + "properties": { + "description": { + "description": "Description of the media item. This will be shown to the user in the item's\ninfo section in the Google Photos app.\nThis string shouldn't be more than 1000 characters.", + "type": "string" + }, + "simpleMediaItem": { + "$ref": "SimpleMediaItem", + "description": "A new media item that has been uploaded via the included `uploadToken`." + } + }, + "id": "NewMediaItem", + "description": "New media item that's created in a user's Google Photos account." + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\nthree pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the\n[API Design Guide](https://cloud.google.com/apis/design/errors).", + "type": "object", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "message": { + "type": "string", + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client." + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", + "type": "array", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + } + } + }, + "id": "Status" + }, + "MediaItemResult": { + "description": "Result of retrieving a media item.", + "type": "object", + "properties": { + "mediaItem": { + "$ref": "MediaItem", + "description": "Media item retrieved from the user's library. It's populated if no errors\noccurred and the media item was fetched successfully." + }, + "status": { + "$ref": "Status", + "description": "If an error occurred while accessing this media item, this field\nis populated with information related to the error. For details regarding\nthis field, see Status." + } + }, + "id": "MediaItemResult" + }, + "LocationEnrichment": { + "id": "LocationEnrichment", + "description": "An enrichment containing a single location.", + "type": "object", + "properties": { + "location": { + "$ref": "Location", + "description": "Location for this enrichment item." + } + } + }, + "BatchCreateMediaItemsResponse": { + "id": "BatchCreateMediaItemsResponse", + "description": "List of media items created.", + "type": "object", + "properties": { + "newMediaItemResults": { + "description": "Output only. List of media items created.", + "type": "array", + "items": { + "$ref": "NewMediaItemResult" + } + } + } + }, + "MediaItem": { + "description": "Representation of a media item (such as a photo or video) in Google Photos.", + "type": "object", + "properties": { + "filename": { + "type": "string", + "description": "Filename of the media item. This is shown to the user in the item's info\nsection in the Google Photos app." + }, + "productUrl": { + "description": "Google Photos URL for the media item. This link is available to\nthe user only if they're signed in.", + "type": "string" + }, + "id": { + "description": "Identifier for the media item. This is a persistent identifier that can be\nused between sessions to identify this media item.", + "type": "string" + }, + "mimeType": { + "description": "MIME type of the media item. For example, `image/jpeg`.", + "type": "string" + }, + "baseUrl": { + "description": "A URL to the media item's bytes. This shouldn't be used as is. Parameters\nshould be appended to this URL before use. See the [developer\ndocumentation](https://developers.google.com/photos/library/guides/access-media-items#base-urls)\nfor a complete list of supported parameters. For example, `'=w2048-h1024'`\nwill set the dimensions of a media item of type photo to have a width of\n2048 px and height of 1024 px.", + "type": "string" + }, + "contributorInfo": { + "$ref": "ContributorInfo", + "description": "Information about the user who created this media item." + }, + "mediaMetadata": { + "$ref": "MediaMetadata", + "description": "Metadata related to the media item, such as, height, width, or\ncreation time." + }, + "description": { + "description": "Description of the media item. This is shown to the user in the item's\ninfo section in the Google Photos app.", + "type": "string" + } + }, + "id": "MediaItem" + }, + "UnshareAlbumRequest": { + "description": "Request to unshare a shared album in Google Photos.", + "type": "object", + "properties": {}, + "id": "UnshareAlbumRequest" + }, + "JoinSharedAlbumRequest": { + "id": "JoinSharedAlbumRequest", + "description": "Request to join a shared album on behalf of the user. This uses a shareToken\nwhich can be acquired via the shareAlbum or listSharedAlbums calls.", + "type": "object", + "properties": { + "shareToken": { + "description": "Token to join the shared album on behalf of the user.", + "type": "string" + } + } + }, + "SharedAlbumOptions": { + "id": "SharedAlbumOptions", + "description": "Options that control the sharing of an album.", + "type": "object", + "properties": { + "isCommentable": { + "description": "True if the shared album allows the owner and the collaborators (users\nwho have joined the album) to add comments to the album. Defaults to false.", + "type": "boolean" + }, + "isCollaborative": { + "description": "True if the shared album allows collaborators (users who have joined\nthe album) to add media items to it. Defaults to false.", + "type": "boolean" + } + } + }, + "ContentFilter": { + "id": "ContentFilter", + "description": "This filter allows you to return media items based on the content type.\n\nIt's possible to specify a list of categories to include, and/or a list of\ncategories to exclude. Within each list, the categories are combined with an\nOR. \u003cp\u003e\nThe content filter `includedContentCategories`: [c1, c2, c3] would get media\nitems that contain (c1 OR c2 OR c3). \u003cp\u003e\nThe content filter `excludedContentCategories`: [c1, c2, c3] would NOT get\nmedia items that contain (c1 OR c2 OR c3). \u003cp\u003e\nYou can also include some categories while excluding others, as in this\nexample: `includedContentCategories`: [c1, c2], `excludedContentCategories`:\n[c3, c4] \u003cp\u003e\nThe previous example would get media items that contain (c1 OR c2) AND NOT\n(c3 OR c4). A category that appears in `includedContentategories` must not\nappear in `excludedContentCategories`.", + "type": "object", + "properties": { + "includedContentCategories": { + "enumDescriptions": [ + "Default content category. This category is ignored when any other category\nis used in the filter.", + "Media items containing landscapes.", + "Media items containing receipts.", + "Media items containing cityscapes.", + "Media items containing landmarks.", + "Media items that are selfies.", + "Media items containing people.", + "Media items containing pets.", + "Media items from weddings.", + "Media items from birthdays.", + "Media items containing documents.", + "Media items taken during travel.", + "Media items containing animals.", + "Media items containing food.", + "Media items from sporting events.", + "Media items taken at night.", + "Media items from performances.", + "Media items containing whiteboards.", + "Media items that are screenshots.", + "Media items that are considered to be utility. These include, but aren't\nlimited to documents, screenshots, whiteboards etc.", + "Media items containing art.", + "Media items containing crafts.", + "Media items related to fashion.", + "Media items containing houses.", + "Media items containing gardens.", + "Media items containing flowers.", + "Media items taken of holidays." + ], + "description": "The set of categories to be included in the media item search results.\nThe items in the set are ORed. There's a maximum of 10\n`includedContentCategories` per request.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "NONE", + "LANDSCAPES", + "RECEIPTS", + "CITYSCAPES", + "LANDMARKS", + "SELFIES", + "PEOPLE", + "PETS", + "WEDDINGS", + "BIRTHDAYS", + "DOCUMENTS", + "TRAVEL", + "ANIMALS", + "FOOD", + "SPORT", + "NIGHT", + "PERFORMANCES", + "WHITEBOARDS", + "SCREENSHOTS", + "UTILITY", + "ARTS", + "CRAFTS", + "FASHION", + "HOUSES", + "GARDENS", + "FLOWERS", + "HOLIDAYS" + ] + } + }, + "excludedContentCategories": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "NONE", + "LANDSCAPES", + "RECEIPTS", + "CITYSCAPES", + "LANDMARKS", + "SELFIES", + "PEOPLE", + "PETS", + "WEDDINGS", + "BIRTHDAYS", + "DOCUMENTS", + "TRAVEL", + "ANIMALS", + "FOOD", + "SPORT", + "NIGHT", + "PERFORMANCES", + "WHITEBOARDS", + "SCREENSHOTS", + "UTILITY", + "ARTS", + "CRAFTS", + "FASHION", + "HOUSES", + "GARDENS", + "FLOWERS", + "HOLIDAYS" + ] + }, + "enumDescriptions": [ + "Default content category. This category is ignored when any other category\nis used in the filter.", + "Media items containing landscapes.", + "Media items containing receipts.", + "Media items containing cityscapes.", + "Media items containing landmarks.", + "Media items that are selfies.", + "Media items containing people.", + "Media items containing pets.", + "Media items from weddings.", + "Media items from birthdays.", + "Media items containing documents.", + "Media items taken during travel.", + "Media items containing animals.", + "Media items containing food.", + "Media items from sporting events.", + "Media items taken at night.", + "Media items from performances.", + "Media items containing whiteboards.", + "Media items that are screenshots.", + "Media items that are considered to be utility. These include, but aren't\nlimited to documents, screenshots, whiteboards etc.", + "Media items containing art.", + "Media items containing crafts.", + "Media items related to fashion.", + "Media items containing houses.", + "Media items containing gardens.", + "Media items containing flowers.", + "Media items taken of holidays." + ], + "description": "The set of categories which are not to be included in the media item search\nresults. The items in the set are ORed. There's a maximum of 10\n`excludedContentCategories` per request." + } + } + }, + "LeaveSharedAlbumResponse": { + "id": "LeaveSharedAlbumResponse", + "description": "Response to successfully leaving the shared album on behalf of the user.", + "type": "object", + "properties": {} + }, + "UnshareAlbumResponse": { + "description": "Response of a successful unshare of a shared album.", + "type": "object", + "properties": {}, + "id": "UnshareAlbumResponse" + } + }, + "protocol": "rest", + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "canonicalName": "Photos Library", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/photoslibrary": { + "description": "View and manage your Google Photos library" + }, + "https://www.googleapis.com/auth/photoslibrary.readonly": { + "description": "View your Google Photos library" + }, + "https://www.googleapis.com/auth/photoslibrary.readonly.appcreateddata": { + "description": "Manage photos added by this app" + }, + "https://www.googleapis.com/auth/photoslibrary.appendonly": { + "description": "Add to your Google Photos library" + }, + "https://www.googleapis.com/auth/photoslibrary.sharing": { + "description": "Manage and add to shared albums on your behalf" + } + } + } + }, + "rootUrl": "https://photoslibrary.googleapis.com/", + "ownerDomain": "google.com", + "name": "photoslibrary", + "batchPath": "batch", + "fullyEncodeReservedExpansion": true, + "title": "Photos Library API", + "ownerName": "Google" +} diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..4381bad --- /dev/null +++ b/src/main.rs @@ -0,0 +1,21 @@ +use std::error::Error; +use std::fs::File; +use std::io::Read; + +use discovery_parser::DiscoveryRestDesc; +use google_rest_api_generator::generate; + +fn main() -> Result<(), Box> { + let args: Vec<_> = std::env::args().skip(1).collect(); + if args.len() != 2 { + eprintln!("Usage: main discovery.json output_directory"); + } + let mut file = File::open(&args[0])?; + let mut contents = String::new(); + file.read_to_string(&mut contents)?; + + let disc: DiscoveryRestDesc = serde_json::from_str(&contents)?; + generate(&args[1], &disc)?; + + Ok(()) +}