Skip to content

Commit

Permalink
Update docs for v0.51.1 [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
circle-ci committed Apr 11, 2017
1 parent 49475a2 commit f24e607
Show file tree
Hide file tree
Showing 68 changed files with 216 additions and 0 deletions.
31 changes: 31 additions & 0 deletions json/google-cloud/v0.51.1/authentication.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## Authenticating with this module

It's incredibly easy to get authenticated and start using Google's APIs. You can set your credentials on a global basis as well as on a per-API basis. See each individual API section below to see how you can auth on a per-API-basis. This is useful if you want to use different accounts for different Cloud services.

```js
var config = {
projectId: 'grape-spaceship-123',
keyFilename: '/path/to/keyfile.json'
};
```

### The `config` object

A `config` object is not required if you are in an environment which supports [Application Default Credentials](https://developers.google.com/identity/protocols/application-default-credentials). This could be your own development machine when using the [gcloud SDK](https://cloud.google.com/sdk) or within Google App Engine and Compute Engine.

If this doesn't describe your environment, the `config` object expects the following properties:

1. One of the following:
1. `credentials` object containing `client_email` and `private_key` properties.
2. `keyFilename` path to a .json, .pem, or .p12 key file.
3. `GOOGLE_APPLICATION_CREDENTIALS` environment variable with a full path to your key file.

2. `projectId`

If you wish, you can set an environment variable (`GCLOUD_PROJECT`) in place of specifying this inline. Or, if you have provided a service account JSON key file as the `config.keyFilename` property explained above, your project ID will be detected automatically.

**Note**: When using a .pem or .p12 key file, `config.email` is also required.


[dev-console]: https://console.developers.google.com/project
[gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
1 change: 1 addition & 0 deletions json/google-cloud/v0.51.1/bigquery/dataset.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"id":"bigquery/dataset","type":"class","name":"Dataset","overview":"<p>\n This class allows you interact with BigQuery.\n</p>\n\n\n<div class=\"notice\">\n <strong><code>google-cloud</code> is deprecated</strong>\n <p>\n Due to the scope of our API rapidly increasing, you may notice a decrease in performance if you continue to use the bundled module, <code>google-cloud</code>.\n </p>\n <p>\n Going forward, please install only the individual service modules that you need, such as <code>@google-cloud/bigquery</code>.\n </p>\n <p>\n The instructions below are here for reference, however, we will soon stop releasing updates to the bundled package.\n </p>\n</div>\n\n\n<p>\n First, install <code>google-cloud</code> with npm:\n</p>\n\n<div hljs language=\"bash\">$ npm install --save google-cloud</div>\n\n<p>\n If you are running your app on Google Compute Engine, you won't need to worry about supplying connection configuration options to <code>google-cloud</code>— we figure that out for you.\n</p>\n\n<p>\n However, if you're running your app elsewhere, you will need to provide project details to authenticate API requests.\n</p>\n\n<h4>Google Cloud Platform</h4>\n<div hljs language=\"javascript\">\nvar gcloud = require('google-cloud');\nvar bigquery = gcloud.bigquery();\n</div>\n\n<h4>Elsewhere</h4>\n<div hljs language=\"javascript\">\nvar gcloud = require('google-cloud');\nvar bigquery = gcloud.bigquery({\n projectId: 'grape-spaceship-123',\n keyFilename: '/path/to/keyfile.json'\n});\n</div>\n\n<p>\n The full set of options which can be passed to <code>google-cloud</code> are outlined in our <a href=\"#/docs/google-cloud/0.51.1/guides/authentication\">Authentication guide</a>.\n</p>\n","description":"","source":"packages/bigquery/src/dataset.js","parent":"bigquery","children":[],"methods":[{"id":"Dataset","name":"Dataset","type":"constructor","description":"<p>Interact with your BigQuery dataset. Create a Dataset instance with <a data-custom-type=\"bigquery\" data-method=\"createDataset\">bigquery#createDataset</a> or <a data-custom-type=\"bigquery\" data-method=\"dataset\">bigquery#dataset</a>.</p>","source":"packages/bigquery/src/dataset.js#L49","resources":[],"examples":[{"code":"var dataset = bigquery.dataset('institutions');"}],"params":[],"exceptions":[],"returns":[]},{"id":"create","name":"create","type":"instance","description":"<p>Create a dataset.</p>","source":"packages/bigquery/src/dataset.js#L69","resources":[],"examples":[{"code":"dataset.create(function(err, dataset, apiResponse) {\n if (!err) {\n // The dataset was created successfully.\n }\n});"},{"caption":"<p>If the callback is omitted, we'll return a Promise.</p>","code":"dataset.create().then(function(data) {\n var dataset = data[0];\n var apiResponse = data[1];\n});"}],"params":[],"exceptions":[],"returns":[]},{"id":"exists","name":"exists","type":"instance","description":"<p>Check if the dataset exists.</p>","source":"packages/bigquery/src/dataset.js#L89","resources":[],"examples":[{"code":"dataset.exists(function(err, exists) {});"},{"caption":"<p>If the callback is omitted, we'll return a Promise.</p>","code":"dataset.exists().then(function(data) {\n var exists = data[0];\n});"}],"params":[{"name":"callback","description":"<ul> <li>The callback function.</li> </ul> ","types":["function"],"optional":false,"nullable":false},{"name":"callback.err","description":"<ul> <li>An error returned while making this request.</li> </ul> ","types":["error"],"optional":false,"nullable":true},{"name":"callback.exists","description":"<ul> <li>Whether the dataset exists or not.</li> </ul> ","types":["boolean"],"optional":false,"nullable":false}],"exceptions":[],"returns":[]},{"id":"get","name":"get","type":"instance","description":"<p>Get a dataset if it exists.</p><p>You may optionally use this to &quot;get or create&quot; an object by providing an object with <code>autoCreate</code> set to <code>true</code>. Any extra configuration that is normally required for the <code>create</code> method must be contained within this object as well.</p>","source":"packages/bigquery/src/dataset.js#L118","resources":[],"examples":[{"code":"dataset.get(function(err, dataset, apiResponse) {\n if (!err) {\n // `dataset.metadata` has been populated.\n }\n});"},{"caption":"<p>If the callback is omitted, we'll return a Promise.</p>","code":"dataset.get().then(function(data) {\n var dataset = data[0];\n var apiResponse = data[1];\n});"}],"params":[{"name":"options","description":"<ul> <li>Configuration object.</li> </ul> ","types":["options"],"optional":true,"nullable":false},{"name":"options.autoCreate","description":"<ul> <li>Automatically create the object if it does not exist. Default: <code>false</code></li> </ul> ","types":["boolean"],"optional":false,"nullable":false}],"exceptions":[],"returns":[]},{"id":"getMetadata","name":"getMetadata","type":"instance","description":"<p>Get the metadata for the Dataset.</p>","source":"packages/bigquery/src/dataset.js#L142","resources":[{"title":"Datasets: get API Documentation","link":"https://cloud.google.com/bigquery/docs/reference/v2/datasets/get"}],"examples":[{"code":"dataset.getMetadata(function(err, metadata, apiResponse) {});"},{"caption":"<p>If the callback is omitted, we'll return a Promise.</p>","code":"dataset.getMetadata().then(function(data) {\n var metadata = data[0];\n var apiResponse = data[1];\n});"}],"params":[{"name":"callback","description":"<ul> <li>The callback function.</li> </ul> ","types":["function"],"optional":false,"nullable":false},{"name":"callback.err","description":"<ul> <li>An error returned while making this request.</li> </ul> ","types":["error"],"optional":false,"nullable":true},{"name":"callback.metadata","description":"<ul> <li>The dataset&#39;s metadata.</li> </ul> ","types":["object"],"optional":false,"nullable":false},{"name":"callback.apiResponse","description":"<ul> <li>The full API response.</li> </ul> ","types":["object"],"optional":false,"nullable":false}],"exceptions":[],"returns":[]},{"id":"setMetadata","name":"setMetadata","type":"instance","description":"<p>Sets the metadata of the Dataset object.</p>","source":"packages/bigquery/src/dataset.js#L169","resources":[{"title":"Datasets: patch API Documentation","link":"https://cloud.google.com/bigquery/docs/reference/v2/datasets/patch"}],"examples":[{"code":"var metadata = {\n description: 'Info for every institution in the 2013 IPEDS universe'\n};\n\ndataset.setMetadata(metadata, function(err, apiResponse) {});"},{"caption":"<p>If the callback is omitted, we'll return a Promise.</p>","code":"dataset.setMetadata(metadata).then(function(data) {\n var apiResponse = data[0];\n});"}],"params":[{"name":"metadata","description":"<ul> <li>Metadata to save on the Dataset.</li> </ul> ","types":["object"],"optional":false,"nullable":false},{"name":"callback","description":"<ul> <li>The callback function.</li> </ul> ","types":["function"],"optional":false,"nullable":false},{"name":"callback.err","description":"<ul> <li>An error returned while making this request.</li> </ul> ","types":["error"],"optional":false,"nullable":true},{"name":"callback.apiResponse","description":"<ul> <li>The full API response.</li> </ul> ","types":["object"],"optional":false,"nullable":false}],"exceptions":[],"returns":[]},{"id":"createTable","name":"createTable","type":"instance","description":"<p>Create a table given a tableId or configuration object.</p>","source":"packages/bigquery/src/dataset.js#L244","resources":[{"title":"Tables: insert API Documentation","link":"https://cloud.google.com/bigquery/docs/reference/v2/tables/insert"}],"examples":[{"code":"var tableId = 'institution_data';\n\nvar options = {\n // From the data.gov CSV dataset (http://goo.gl/kSE7z6):\n schema: 'UNITID,INSTNM,ADDR,CITY,STABBR,ZIP,FIPS,OBEREG,CHFNM,...'\n};\n\ndataset.createTable(tableId, options, function(err, table, apiResponse) {});"},{"caption":"<p>If the callback is omitted, we'll return a Promise.</p>","code":"dataset.createTable(tableId, options).then(function(data) {\n var table = data[0];\n var apiResponse = data[1];\n});"}],"params":[{"name":"id","description":"<ul> <li>Table id.</li> </ul> ","types":["string"],"optional":false,"nullable":false},{"name":"options","description":"<ul> <li>See a <a href=\"https://cloud.google.com/bigquery/docs/reference/v2/tables#resource\">Table resource</a>.</li> </ul> ","types":["object"],"optional":true,"nullable":false},{"name":"options.schema","description":"<ul> <li>A comma-separated list of name:type pairs. Valid types are &quot;string&quot;, &quot;integer&quot;, &quot;float&quot;, &quot;boolean&quot;, and &quot;timestamp&quot;. If the type is omitted, it is assumed to be &quot;string&quot;. Example: &quot;name:string, age:integer&quot;. Schemas can also be specified as a JSON array of fields, which allows for nested and repeated fields. See a <a href=\"http://goo.gl/sl8Dmg\">Table resource</a> for more detailed information.</li> </ul> ","types":["string","object"],"optional":false,"nullable":false},{"name":"callback","description":"<ul> <li>The callback function.</li> </ul> ","types":["function"],"optional":false,"nullable":false},{"name":"callback.err","description":"<ul> <li>An error returned while making this request</li> </ul> ","types":["error"],"optional":false,"nullable":true},{"name":"callback.table","description":"<ul> <li>The newly created table.</li> </ul> ","types":["<a data-custom-type=\"bigquery/table\" data-method=\"\">bigquery/table</a>"],"optional":false,"nullable":false},{"name":"callback.apiResponse","description":"<ul> <li>The full API response.</li> </ul> ","types":["object"],"optional":false,"nullable":false}],"exceptions":[],"returns":[]},{"id":"delete","name":"delete","type":"instance","description":"<p>Delete the dataset.</p>","source":"packages/bigquery/src/dataset.js#L327","resources":[{"title":"Datasets: delete API Documentation","link":"https://cloud.google.com/bigquery/docs/reference/v2/datasets/delete"}],"examples":[{"caption":"<p>Delete the dataset, only if it does not have any tables.</p>","code":"dataset.delete(function(err, apiResponse) {});"},{"caption":"<p>Delete the dataset and any tables it contains.</p>","code":"dataset.delete({ force: true }, function(err, apiResponse) {});"},{"caption":"<p>If the callback is omitted, we'll return a Promise.</p>","code":"dataset.delete().then(function(data) {\n var apiResponse = data[0];\n});"}],"params":[{"name":"options","description":"<ul> <li>The configuration object.</li> </ul> ","types":["object"],"optional":true,"nullable":false},{"name":"options.force","description":"<ul> <li>Force delete dataset and all tables. Default: false.</li> </ul> ","types":["boolean"],"optional":false,"nullable":false},{"name":"callback","description":"<ul> <li>The callback function.</li> </ul> ","types":["function"],"optional":false,"nullable":false},{"name":"callback.err","description":"<ul> <li>An error returned while making this request</li> </ul> ","types":["error"],"optional":false,"nullable":true},{"name":"callback.apiResponse","description":"<ul> <li>The full API response.</li> </ul> ","types":["object"],"optional":false,"nullable":false}],"exceptions":[],"returns":[]},{"id":"getTables","name":"getTables","type":"instance","description":"<p>Get a list of tables.</p>","source":"packages/bigquery/src/dataset.js#L389","resources":[{"title":"Tables: list API Documentation","link":"https://cloud.google.com/bigquery/docs/reference/v2/tables/list"}],"examples":[{"code":"dataset.getTables(function(err, tables) {\n // tables is an array of `Table` objects.\n});"},{"caption":"<p>To control how many API requests are made and page through the results \nmanually, set <code>autoPaginate</code> to <code>false</code>.</p>","code":"function callback(err, tables, nextQuery, apiResponse) {\n if (nextQuery) {\n // More results exist.\n dataset.getTables(nextQuery, callback);\n }\n}\n\ndataset.getTables({\n autoPaginate: false\n}, callback);"},{"caption":"<p>If the callback is omitted, we'll return a Promise.</p>","code":"dataset.getTables().then(function(data) {\n var tables = data[0];\n});"}],"params":[{"name":"query","description":"<ul> <li>Configuration object.</li> </ul> ","types":["object"],"optional":true,"nullable":false},{"name":"query.autoPaginate","description":"<ul> <li>Have pagination handled automatically. Default: true.</li> </ul> ","types":["boolean"],"optional":false,"nullable":false},{"name":"query.maxApiCalls","description":"<ul> <li>Maximum number of API calls to make.</li> </ul> ","types":["number"],"optional":false,"nullable":false},{"name":"query.maxResults","description":"<ul> <li>Maximum number of results to return.</li> </ul> ","types":["number"],"optional":false,"nullable":false},{"name":"query.pageToken","description":"<ul> <li>Token returned from a previous call, to request the next page of results.</li> </ul> ","types":["string"],"optional":false,"nullable":false},{"name":"callback","description":"<ul> <li>The callback function.</li> </ul> ","types":["function"],"optional":false,"nullable":false},{"name":"callback.err","description":"<ul> <li>An error returned while making this request</li> </ul> ","types":["error"],"optional":false,"nullable":true},{"name":"callback.tables","description":"<ul> <li>The list of tables from your Dataset.</li> </ul> ","types":["<a data-custom-type=\"bigquery/table[]\" data-method=\"\">bigquery/table[]</a>"],"optional":false,"nullable":false},{"name":"callback.apiResponse","description":"<ul> <li>The full API response.</li> </ul> ","types":["object"],"optional":false,"nullable":false}],"exceptions":[],"returns":[]},{"id":"getTablesStream","name":"getTablesStream","type":"instance","description":"<p>List all or some of the <a data-custom-type=\"bigquery/table\" data-method=\"\">bigquery/table</a> objects in your project as a readable object stream.</p>","source":"packages/bigquery/src/dataset.js#L450","resources":[],"examples":[{"code":"dataset.getTablesStream()\n .on('error', console.error)\n .on('data', function(table) {})\n .on('end', function() {\n // All tables have been retrieved\n });"},{"caption":"<p>If you anticipate many results, you can end a stream early to prevent \nunnecessary processing and API requests.</p>","code":"dataset.getTablesStream()\n .on('data', function(table) {\n this.end();\n });"}],"params":[{"name":"query","description":"<ul> <li>Configuration object. See <a data-custom-type=\"bigquery/dataset\" data-method=\"getTables\">bigquery/dataset#getTables</a> for a complete list of options.</li> </ul> ","types":["object"],"optional":true,"nullable":false}],"exceptions":[],"returns":[{"types":["stream"],"description":""}]},{"id":"table","name":"table","type":"instance","description":"<p>Create a Table object.</p>","source":"packages/bigquery/src/dataset.js#L482","resources":[],"examples":[{"code":"var institutions = dataset.table('institution_data');"}],"params":[{"name":"id","description":"<ul> <li>The ID of the table.</li> </ul> ","types":["string"],"optional":false,"nullable":false}],"exceptions":[],"returns":[{"types":["<a data-custom-type=\"bigquery/table\" data-method=\"\">bigquery/table</a>"],"description":""}]}],"path":"dataset.json"}
1 change: 1 addition & 0 deletions json/google-cloud/v0.51.1/bigquery/index.json

Large diffs are not rendered by default.

Loading

0 comments on commit f24e607

Please sign in to comment.