changeset 86:46c8f859acd0

Describe usage of generate.py better
author Lewin Bormann <lbo@spheniscida.de>
date Sat, 24 Oct 2020 17:32:30 +0200
parents 8affd19aab34
children f1ab59530f8f
files README.md generate/README.md
diffstat 2 files changed, 15 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/README.md	Sat Oct 24 17:27:54 2020 +0200
+++ b/README.md	Sat Oct 24 17:32:30 2020 +0200
@@ -28,7 +28,7 @@
   $ pipenv run ./generate.py --only_apis=storage:v1
   ```
   (install `pipenv` using `pip install --user pipenv` before, if you don't have it
-  yet)
+  yet). See more details in that directory.
 * Consult `drive_example` for a simple but useful example of using the generated
   code. As you can see, it is reasonably easy! Use `cargo doc` to generate the
   documentation for generated code, as the API comments is translated into Rust
--- a/generate/README.md	Sat Oct 24 17:27:54 2020 +0200
+++ b/generate/README.md	Sat Oct 24 17:32:30 2020 +0200
@@ -7,3 +7,17 @@
 Make sure to import the `async-google-apis-common` crate in your `Cargo.toml`.
 Please read the `README` in that crate for further advice.
 
+* To generate an API listed in the global discovery document (specified by
+    `--discovery_base`, which defaults to Google's at https://www.googleapis.com/discovery/v1/apis):
+  ```bash
+     generate.py --only_apis=api_id:v1
+  ```
+* To list all available APIs from the global discovery document:
+  ```bash
+     generate.py --list
+  ```
+* To generate an API that is not listed in the global discovery document:
+  ```bash
+     generate.py --doc=https://www.googleapis.com/discovery/v1/apis/photoslibrary/v1/rest
+  ```
+