view generate/README.md @ 101:970a6e4a3be0

Added tag common_v0.1.5 for changeset 42625070b740
author Lewin Bormann <lbo@spheniscida.de>
date Sat, 24 Oct 2020 22:46:05 +0200
parents 46c8f859acd0
children 8761ce938e11
line wrap: on
line source

# async-google-apis: Generator

This python script (collection) generates Rust code from Google's API discovery
documents. The easiest way to use the code is to copy the generated code to your
crate.

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
  ```