Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: generate docs for dfareporting and add repo-metadata (#1728)
- Loading branch information
1 parent
0a44445
commit a0dc7b5
Showing
5 changed files
with
125 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,4 @@ samples/*.keys.json | |
samples/**/credentials.json | ||
package-lock.json | ||
yarn.lock | ||
__pycache__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "googleapis", | ||
"name_pretty": "Google APIs Node.js Client", | ||
"release_level": "beta", | ||
"language": "nodejs", | ||
"repo": "googleapis/google-api-nodejs-client", | ||
"distribution_name": "googleapis" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,94 +1,134 @@ | ||
# Samples by API | ||
The following samples show basic usage of various APIs. **All samples require Node.js 8.x or greater**. | ||
[//]: # "This README.md file is auto-generated, all changes to this file will be lost." | ||
[//]: # "To regenerate it, use `python -m synthtool`." | ||
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/> | ||
|
||
Throughout these samples, you will find code that relies on various authentication methods. | ||
- **OAuth2** - To use the OAuth2 samples, create a credential in the cloud developer console, and save the file as `oauth2.keys.json` in the samples directory. | ||
- **Service account** - To use the service account based samples, create a new service account in the cloud developer console, and save the file as `jwt.keys.json` in the samples directory. | ||
- **API Key** - To use simple API keys, create a new API Key in the cloud developer console, then store the key in the `api_key` field of `config.json`. | ||
# [Google APIs Node.js Client: Node.js Samples](https://github.com/googleapis/google-api-nodejs-client) | ||
|
||
[![Open in Cloud Shell][shell_img]][shell_link] | ||
|
||
## ![](http://www.google.com/images/icons/product/analytics-32.png) Google Analytics API | ||
|
||
View and manage your Google Analytics data. | ||
|
||
<!--Documentation for the Google Analytics API in | ||
[JSDoc](http://google.github.io/google-api-nodejs-client/classes/_apis_analytics_v3_.analytics.html).--> | ||
## Table of Contents | ||
|
||
* [Before you begin](#before-you-begin) | ||
* [Samples](#samples) | ||
* [Defaultauth](#defaultauth) | ||
* [Jwt](#jwt) | ||
* [Mediaupload](#mediaupload) | ||
* [Multiple](#multiple) | ||
* [Oauth2](#oauth2) | ||
* [Sampleclient](#sampleclient) | ||
|
||
<table> | ||
<tr> | ||
<td><a href="analytics">samples/analytics</a></td> | ||
<td>Command-line samples for producing reports with the Analytics API</td> | ||
</tr> | ||
</table> | ||
## Before you begin | ||
|
||
## ![](http://www.google.com/images/icons/product/blogger-32.png) Blogger API | ||
Before running the samples, make sure you've followed the steps outlined in | ||
[Using the client library](https://github.com/googleapis/google-api-nodejs-client#using-the-client-library). | ||
|
||
View and manage Blogger data. | ||
## Samples | ||
|
||
<!--Documentation for the Blogger API in | ||
[JSDoc](http://google.github.io/google-api-nodejs-client/classes/_apis_blogger_v3_.blogger.html).--> | ||
|
||
<table> | ||
<tr> | ||
<td><a href="blogger">samples/blogger</a></td> | ||
<td>Command-line samples for reading data with the Blogger API</td> | ||
</tr> | ||
</table> | ||
|
||
## ![](https://www.google.com/images/icons/product/compute_engine-32.png) Google Compute Engine Metadata API | ||
### Defaultauth | ||
|
||
Lets you set key/value pairs using the GCE metadata service. | ||
View the [source code](https://github.com/googleapis/google-api-nodejs-client/blob/master/samples/defaultauth.js). | ||
|
||
<!--Documentation for the Google Compute Engine Metadata API in | ||
[JSDoc](http://google.github.io/google-api-nodejs-client/classes/_apis_compute_v1_.compute.html).--> | ||
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-api-nodejs-client&page=editor&open_in_editor=samples/defaultauth.js,samples/README.md) | ||
|
||
<table> | ||
<tr> | ||
<td><a href="compute">samples/compute</a></td> | ||
<td>Demonstrates how to use the Google Compute Engine Metadata API</td> | ||
</tr> | ||
</table> | ||
__Usage:__ | ||
|
||
## ![](http://www.google.com/images/icons/product/customsearch-32.png) CustomSearch API | ||
|
||
Lets you search over a website or collection of websites. | ||
`node defaultauth.js` | ||
|
||
<!--Documentation for the CustomSearch API in | ||
[JSDoc](http://google.github.io/google-api-nodejs-client/classes/_apis_customsearch_v1_.customsearch.html).--> | ||
|
||
<table> | ||
<tr> | ||
<td><a href="customsearch">samples/customsearch</a></td> | ||
<td>Search from the command-line</td> | ||
</tr> | ||
</table> | ||
----- | ||
|
||
|
||
## ![](http://www.google.com/images/icons/product/search-32.png) Glass Mirror API | ||
|
||
The Google Mirror API allows you to build web-based services that interact with Google Glass. It provides this functionality over a cloud-based API and does not require running code on Glass. | ||
|
||
<!--Documentation for the Glass Mirror API in | ||
[JSDoc](http://google.github.io/google-api-nodejs-client/classes/_apis_mirror_v1_.mirror.html).--> | ||
### Jwt | ||
|
||
<table> | ||
<tr> | ||
<td><a href="mirror">samples/mirror</a></td> | ||
<td>Obtains a list of locations from glass data</td> | ||
</tr> | ||
</table> | ||
View the [source code](https://github.com/googleapis/google-api-nodejs-client/blob/master/samples/jwt.js). | ||
|
||
## ![](http://www.google.com/images/icons/product/youtube-32.png) YouTube API | ||
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-api-nodejs-client&page=editor&open_in_editor=samples/jwt.js,samples/README.md) | ||
|
||
With the YouTube Data API, you can add a variety of YouTube features to your application. Use the API to upload videos, manage playlists and subscriptions, update channel settings, and more. | ||
__Usage:__ | ||
|
||
<!--Documentation for the YouTube Data API in | ||
[JSDoc](http://google.github.io/google-api-nodejs-client/classes/_apis_youtube_v3_.youtube.html).--> | ||
|
||
<table> | ||
<tr> | ||
<td><a href="youtube">samples/youtube</a></td> | ||
<td>Samples for working with playlists, search and videos.</td> | ||
</tr> | ||
</table> | ||
`node jwt.js` | ||
|
||
|
||
----- | ||
|
||
|
||
|
||
|
||
### Mediaupload | ||
|
||
View the [source code](https://github.com/googleapis/google-api-nodejs-client/blob/master/samples/mediaupload.js). | ||
|
||
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-api-nodejs-client&page=editor&open_in_editor=samples/mediaupload.js,samples/README.md) | ||
|
||
__Usage:__ | ||
|
||
|
||
`node mediaupload.js` | ||
|
||
|
||
----- | ||
|
||
|
||
|
||
|
||
### Multiple | ||
|
||
View the [source code](https://github.com/googleapis/google-api-nodejs-client/blob/master/samples/multiple.js). | ||
|
||
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-api-nodejs-client&page=editor&open_in_editor=samples/multiple.js,samples/README.md) | ||
|
||
__Usage:__ | ||
|
||
|
||
`node multiple.js` | ||
|
||
|
||
----- | ||
|
||
|
||
|
||
|
||
### Oauth2 | ||
|
||
View the [source code](https://github.com/googleapis/google-api-nodejs-client/blob/master/samples/oauth2.js). | ||
|
||
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-api-nodejs-client&page=editor&open_in_editor=samples/oauth2.js,samples/README.md) | ||
|
||
__Usage:__ | ||
|
||
|
||
`node oauth2.js` | ||
|
||
|
||
----- | ||
|
||
|
||
|
||
|
||
### Sampleclient | ||
|
||
View the [source code](https://github.com/googleapis/google-api-nodejs-client/blob/master/samples/sampleclient.js). | ||
|
||
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-api-nodejs-client&page=editor&open_in_editor=samples/sampleclient.js,samples/README.md) | ||
|
||
__Usage:__ | ||
|
||
|
||
`node sampleclient.js` | ||
|
||
|
||
|
||
|
||
|
||
|
||
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png | ||
[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-api-nodejs-client&page=editor&open_in_editor=samples/README.md | ||
[product-docs]: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters