Skip to content

Commit

Permalink
docs: add documentation for submodule publishing & update individual …
Browse files Browse the repository at this point in the history
…READMEs (#2581)
  • Loading branch information
sofisl committed Apr 7, 2021
1 parent d2ba497 commit 3c191d5
Show file tree
Hide file tree
Showing 214 changed files with 473 additions and 4,445 deletions.
16 changes: 9 additions & 7 deletions .release-please-manifest.json
@@ -1,5 +1,4 @@
{
".": "70.0.0",
"src/apis/abusiveexperiencereport": "0.2.0",
"src/apis/acceleratedmobilepageurl": "0.2.0",
"src/apis/accesscontextmanager": "0.2.0",
Expand All @@ -17,14 +16,14 @@
"src/apis/androidenterprise": "0.2.0",
"src/apis/androidmanagement": "0.2.0",
"src/apis/androidpublisher": "0.2.0",
"src/apis/apigateway": "1.0.0",
"src/apis/appengine": "0.2.0",
"src/apis/appsactivity": "0.2.0",
"src/apis/bigtableadmin": "0.3.0",
"src/apis/blogger": "0.2.0",
"src/apis/books": "0.2.0",
"src/apis/calendar": "0.2.0",
"src/apis/chat": "0.2.0",
"src/apis/chromemanagement": "0.1.0",
"src/apis/chromepolicy": "0.1.0",
"src/apis/chromeuxreport": "0.2.0",
"src/apis/civicinfo": "0.2.0",
"src/apis/classroom": "0.2.0",
Expand Down Expand Up @@ -60,6 +59,7 @@
"src/apis/firebasehosting": "0.1.0",
"src/apis/firebaseml": "0.1.0",
"src/apis/firebaserules": "0.1.0",
"src/apis/firebasestorage": "0.1.0",
"src/apis/fitness": "0.2.0",
"src/apis/games": "1.0.0",
"src/apis/gamesConfiguration": "0.1.0",
Expand All @@ -82,13 +82,16 @@
"src/apis/localservices": "0.2.0",
"src/apis/manufacturers": "0.2.0",
"src/apis/ml": "0.2.0",
"src/apis/mybusinessaccountmanagement": "0.1.0",
"src/apis/networkmanagement": "0.2.0",
"src/apis/oauth2": "0.2.0",
"src/apis/ondemandscanning": "0.1.0",
"src/apis/pagespeedonline": "0.2.0",
"src/apis/people": "0.2.0",
"src/apis/playablelocations": "0.2.0",
"src/apis/playcustomapp": "0.2.0",
"src/apis/plus": "0.2.0",
"src/apis/policysimulator": "0.1.0",
"src/apis/poly": "0.2.0",
"src/apis/prod_tt_sasportal": "1.0.0",
"src/apis/pubsublite": "0.2.0",
Expand All @@ -102,8 +105,6 @@
"src/apis/script": "0.2.0",
"src/apis/searchconsole": "0.2.0",
"src/apis/serviceconsumermanagement": "0.2.0",
"src/apis/servicecontrol": "1.0.0",
"src/apis/servicemanagement": "0.2.0",
"src/apis/servicenetworking": "0.2.0",
"src/apis/serviceusage": "0.2.0",
"src/apis/sheets": "0.2.0",
Expand All @@ -130,5 +131,6 @@
"src/apis/workflowexecutions": "0.2.0",
"src/apis/youtube": "1.0.0",
"src/apis/youtubeAnalytics": "0.1.0",
"src/apis/youtubereporting": "0.1.0"
}
"src/apis/youtubereporting": "0.1.0",
".": "70.0.0"
}
33 changes: 33 additions & 0 deletions README.md
Expand Up @@ -54,6 +54,13 @@ This library is distributed on `npm`. In order to add it as a dependency, run th
$ npm install googleapis
```

If you need to reduce startup times, you can also install a submodule as its own dependency. We make an effort to publish submodules that are __not__ in this [list](https://github.com/googleapis/google-cloud-node#google-cloud-nodejs-client-libraries). In order to add it as a dependency, run the following sample command, replacing with your preferred API:

``` sh
$ npm install @googleapis/docs
```

You can run [this search](https://www.npmjs.com/search?q=scope%3Agoogleapis) on npm, to find a list of the submodules available.
### Using the client library

This is a very simple example. This creates a Blogger client and retrieves the details of a blog given the blog Id:
Expand Down Expand Up @@ -104,6 +111,32 @@ async function runSample() {
runSample().catch(console.error);
```

You can also make calls directly to the APIs by installing a submodule:

``` js
const docs = require('@googleapis/docs')

const auth = new docs.auth.GoogleAuth({
keyFilename: 'PATH_TO_SERVICE_ACCOUNT_KEY.json',
// Scopes can be specified either as an array or as a single, space-delimited string.
scopes: ['https://www.googleapis.com/auth/documents']
});
const authClient = await auth.getClient();

const client = await docs.docs({
version: 'v1',
auth: authClient
});

const createResponse = await client.documents.create({
requestBody: {
title: 'Your new document!',
},
});

console.log(createResponse.data);
```

### Samples
There are a lot of [samples](https://github.com/googleapis/google-api-nodejs-client/tree/master/samples) 🤗 If you're trying to figure out how to use an API ... look there first! If there's a sample you need missing, feel free to file an [issue][bugs].

Expand Down
16 changes: 9 additions & 7 deletions release-please-config.json
@@ -1,7 +1,6 @@
{
"bootstrap-sha": "6e61af34c0bfdfc3d6f973bffcd6a7e2420590d2",
"packages": {
".": "68.0.0",
"src/apis/abusiveexperiencereport": {},
"src/apis/acceleratedmobilepageurl": {},
"src/apis/accesscontextmanager": {},
Expand All @@ -19,14 +18,14 @@
"src/apis/androidenterprise": {},
"src/apis/androidmanagement": {},
"src/apis/androidpublisher": {},
"src/apis/apigateway": {},
"src/apis/appengine": {},
"src/apis/appsactivity": {},
"src/apis/bigtableadmin": {},
"src/apis/blogger": {},
"src/apis/books": {},
"src/apis/calendar": {},
"src/apis/chat": {},
"src/apis/chromemanagement": {},
"src/apis/chromepolicy": {},
"src/apis/chromeuxreport": {},
"src/apis/civicinfo": {},
"src/apis/classroom": {},
Expand Down Expand Up @@ -62,6 +61,7 @@
"src/apis/firebasehosting": {},
"src/apis/firebaseml": {},
"src/apis/firebaserules": {},
"src/apis/firebasestorage": {},
"src/apis/fitness": {},
"src/apis/games": {},
"src/apis/gamesConfiguration": {},
Expand All @@ -84,13 +84,16 @@
"src/apis/localservices": {},
"src/apis/manufacturers": {},
"src/apis/ml": {},
"src/apis/mybusinessaccountmanagement": {},
"src/apis/networkmanagement": {},
"src/apis/oauth2": {},
"src/apis/ondemandscanning": {},
"src/apis/pagespeedonline": {},
"src/apis/people": {},
"src/apis/playablelocations": {},
"src/apis/playcustomapp": {},
"src/apis/plus": {},
"src/apis/policysimulator": {},
"src/apis/poly": {},
"src/apis/prod_tt_sasportal": {},
"src/apis/pubsublite": {},
Expand All @@ -104,8 +107,6 @@
"src/apis/script": {},
"src/apis/searchconsole": {},
"src/apis/serviceconsumermanagement": {},
"src/apis/servicecontrol": {},
"src/apis/servicemanagement": {},
"src/apis/servicenetworking": {},
"src/apis/serviceusage": {},
"src/apis/sheets": {},
Expand All @@ -132,6 +133,7 @@
"src/apis/workflowexecutions": {},
"src/apis/youtube": {},
"src/apis/youtubeAnalytics": {},
"src/apis/youtubereporting": {}
"src/apis/youtubereporting": {},
".": {}
}
}
}
23 changes: 2 additions & 21 deletions src/apis/abusiveexperiencereport/README.md
Expand Up @@ -7,31 +7,12 @@
## Installation

```sh
$ npm install googleapis
$ npm install @googleapis/abusiveexperiencereport
```

## Usage
All documentation and usage information can be found on [GitHub](https://github.com/googleapis/google-api-nodejs-client).

## Building a browser bundle

This library can be used in a browser. To prepare a single file bundle, clone the
[repository](https://github.com/googleapis/google-api-nodejs-client) and run

```sh
$ cd src/apis/abusiveexperiencereport
$ npm install
$ npm run webpack
```

The generated bundle will be written to `dist/abusiveexperiencereport.min.js`. Use it from your HTML file:

```html
<script src="/path/to/abusiveexperiencereport.min.js"></script>
<script>
const { abusiveexperiencereport, auth } = Abusiveexperiencereport;
</script>
```
Information on classes can be found in [Googleapis Documentation](https://googleapis.dev/nodejs/googleapis/latest/abusiveexperiencereport/classes/Abusiveexperiencereport.html).

## License
This library is licensed under Apache 2.0. Full license text is available in [LICENSE](https://github.com/googleapis/google-api-nodejs-client/blob/master/LICENSE).
Expand Down
23 changes: 2 additions & 21 deletions src/apis/acceleratedmobilepageurl/README.md
Expand Up @@ -7,31 +7,12 @@
## Installation

```sh
$ npm install googleapis
$ npm install @googleapis/acceleratedmobilepageurl
```

## Usage
All documentation and usage information can be found on [GitHub](https://github.com/googleapis/google-api-nodejs-client).

## Building a browser bundle

This library can be used in a browser. To prepare a single file bundle, clone the
[repository](https://github.com/googleapis/google-api-nodejs-client) and run

```sh
$ cd src/apis/acceleratedmobilepageurl
$ npm install
$ npm run webpack
```

The generated bundle will be written to `dist/acceleratedmobilepageurl.min.js`. Use it from your HTML file:

```html
<script src="/path/to/acceleratedmobilepageurl.min.js"></script>
<script>
const { acceleratedmobilepageurl, auth } = Acceleratedmobilepageurl;
</script>
```
Information on classes can be found in [Googleapis Documentation](https://googleapis.dev/nodejs/googleapis/latest/acceleratedmobilepageurl/classes/Acceleratedmobilepageurl.html).

## License
This library is licensed under Apache 2.0. Full license text is available in [LICENSE](https://github.com/googleapis/google-api-nodejs-client/blob/master/LICENSE).
Expand Down
23 changes: 2 additions & 21 deletions src/apis/accessapproval/README.md
Expand Up @@ -16,31 +16,12 @@ To learn more, see [Client Libraries Explained](https://cloud.google.com/apis/do
## Installation

```sh
$ npm install googleapis
$ npm install @googleapis/accessapproval
```

## Usage
All documentation and usage information can be found on [GitHub](https://github.com/googleapis/google-api-nodejs-client).

## Building a browser bundle

This library can be used in a browser. To prepare a single file bundle, clone the
[repository](https://github.com/googleapis/google-api-nodejs-client) and run

```sh
$ cd src/apis/accessapproval
$ npm install
$ npm run webpack
```

The generated bundle will be written to `dist/accessapproval.min.js`. Use it from your HTML file:

```html
<script src="/path/to/accessapproval.min.js"></script>
<script>
const { accessapproval, auth } = Accessapproval;
</script>
```
Information on classes can be found in [Googleapis Documentation](https://googleapis.dev/nodejs/googleapis/latest/accessapproval/classes/Accessapproval.html).

## License
This library is licensed under Apache 2.0. Full license text is available in [LICENSE](https://github.com/googleapis/google-api-nodejs-client/blob/master/LICENSE).
Expand Down
23 changes: 2 additions & 21 deletions src/apis/accesscontextmanager/README.md
Expand Up @@ -7,31 +7,12 @@
## Installation

```sh
$ npm install googleapis
$ npm install @googleapis/accesscontextmanager
```

## Usage
All documentation and usage information can be found on [GitHub](https://github.com/googleapis/google-api-nodejs-client).

## Building a browser bundle

This library can be used in a browser. To prepare a single file bundle, clone the
[repository](https://github.com/googleapis/google-api-nodejs-client) and run

```sh
$ cd src/apis/accesscontextmanager
$ npm install
$ npm run webpack
```

The generated bundle will be written to `dist/accesscontextmanager.min.js`. Use it from your HTML file:

```html
<script src="/path/to/accesscontextmanager.min.js"></script>
<script>
const { accesscontextmanager, auth } = Accesscontextmanager;
</script>
```
Information on classes can be found in [Googleapis Documentation](https://googleapis.dev/nodejs/googleapis/latest/accesscontextmanager/classes/Accesscontextmanager.html).

## License
This library is licensed under Apache 2.0. Full license text is available in [LICENSE](https://github.com/googleapis/google-api-nodejs-client/blob/master/LICENSE).
Expand Down
23 changes: 2 additions & 21 deletions src/apis/adexchangebuyer/README.md
Expand Up @@ -7,31 +7,12 @@
## Installation

```sh
$ npm install googleapis
$ npm install @googleapis/adexchangebuyer
```

## Usage
All documentation and usage information can be found on [GitHub](https://github.com/googleapis/google-api-nodejs-client).

## Building a browser bundle

This library can be used in a browser. To prepare a single file bundle, clone the
[repository](https://github.com/googleapis/google-api-nodejs-client) and run

```sh
$ cd src/apis/adexchangebuyer
$ npm install
$ npm run webpack
```

The generated bundle will be written to `dist/adexchangebuyer.min.js`. Use it from your HTML file:

```html
<script src="/path/to/adexchangebuyer.min.js"></script>
<script>
const { adexchangebuyer, auth } = Adexchangebuyer;
</script>
```
Information on classes can be found in [Googleapis Documentation](https://googleapis.dev/nodejs/googleapis/latest/adexchangebuyer/classes/Adexchangebuyer.html).

## License
This library is licensed under Apache 2.0. Full license text is available in [LICENSE](https://github.com/googleapis/google-api-nodejs-client/blob/master/LICENSE).
Expand Down
23 changes: 2 additions & 21 deletions src/apis/adexchangebuyer2/README.md
Expand Up @@ -7,31 +7,12 @@
## Installation

```sh
$ npm install googleapis
$ npm install @googleapis/adexchangebuyer2
```

## Usage
All documentation and usage information can be found on [GitHub](https://github.com/googleapis/google-api-nodejs-client).

## Building a browser bundle

This library can be used in a browser. To prepare a single file bundle, clone the
[repository](https://github.com/googleapis/google-api-nodejs-client) and run

```sh
$ cd src/apis/adexchangebuyer2
$ npm install
$ npm run webpack
```

The generated bundle will be written to `dist/adexchangebuyer2.min.js`. Use it from your HTML file:

```html
<script src="/path/to/adexchangebuyer2.min.js"></script>
<script>
const { adexchangebuyer2, auth } = Adexchangebuyer2;
</script>
```
Information on classes can be found in [Googleapis Documentation](https://googleapis.dev/nodejs/googleapis/latest/adexchangebuyer2/classes/Adexchangebuyer2.html).

## License
This library is licensed under Apache 2.0. Full license text is available in [LICENSE](https://github.com/googleapis/google-api-nodejs-client/blob/master/LICENSE).
Expand Down

0 comments on commit 3c191d5

Please sign in to comment.