From 7cf51e244b385afe42027e6d895125f2189bb5ee Mon Sep 17 00:00:00 2001 From: Dave Gramlich Date: Fri, 7 Aug 2015 19:16:23 -0400 Subject: [PATCH] docs: add upstream links updated lint rules to ignore 80+ chars for comment urls created resource section added more descriptive link titles and moved resources to the bottom changed @apiDocs to @resource --- .jscsrc | 6 ++++- .jshintrc | 1 - docs/site/components/docs/docs-directives.js | 2 +- docs/site/components/docs/docs.html | 7 ++++-- docs/site/components/docs/docs.js | 8 ++++++- docs/site/css/main.css | 6 +++++ lib/bigquery/dataset.js | 10 ++++++++ lib/bigquery/index.js | 10 ++++++++ lib/bigquery/job.js | 4 ++++ lib/bigquery/table.js | 20 ++++++++++++++++ lib/datastore/dataset.js | 4 +++- lib/datastore/query.js | 18 +++++++------- lib/datastore/request.js | 10 ++++++++ lib/datastore/transaction.js | 8 ++++++- lib/dns/change.js | 2 ++ lib/dns/index.js | 4 ++++ lib/dns/record.js | 2 ++ lib/dns/zone.js | 22 +++++++++++++++++ lib/pubsub/index.js | 8 +++++++ lib/pubsub/subscription.js | 8 +++++++ lib/pubsub/topic.js | 10 ++++++++ lib/search/document.js | 4 ++++ lib/search/index-class.js | 7 ++++-- lib/search/index.js | 2 ++ lib/storage/acl.js | 12 ++++++++++ lib/storage/bucket.js | 24 ++++++++++++++++--- lib/storage/file.js | 25 ++++++++++++++++---- lib/storage/index.js | 7 ++++-- 28 files changed, 222 insertions(+), 29 deletions(-) diff --git a/.jscsrc b/.jscsrc index 2924918018e..351dd965634 100644 --- a/.jscsrc +++ b/.jscsrc @@ -14,5 +14,9 @@ "try", "typeof" ], - "requireCamelCaseOrUpperCaseIdentifiers": "ignoreProperties" + "requireCamelCaseOrUpperCaseIdentifiers": "ignoreProperties", + "maximumLineLength": { + "value": 80, + "allowUrlComments": true + } } diff --git a/.jshintrc b/.jshintrc index 4c934ed6055..438850dbcf1 100644 --- a/.jshintrc +++ b/.jshintrc @@ -7,7 +7,6 @@ "immed": true, "indent": 2, "latedef": "nofunc", - "maxlen": 80, "newcap": true, "node": true, "noarg": true, diff --git a/docs/site/components/docs/docs-directives.js b/docs/site/components/docs/docs-directives.js index 62e1bd7f078..c024363226f 100644 --- a/docs/site/components/docs/docs-directives.js +++ b/docs/site/components/docs/docs-directives.js @@ -26,7 +26,7 @@ angular.module('gcloud.docs') } return { - template: '(code on GitHub)', + template: 'Source Code', link: function($scope) { var method = $scope.method; diff --git a/docs/site/components/docs/docs.html b/docs/site/components/docs/docs.html index e271a5bb5d9..33d93916efc 100644 --- a/docs/site/components/docs/docs.html +++ b/docs/site/components/docs/docs.html @@ -54,7 +54,6 @@

ng-hide="singleMethod && method.name !== singleMethod">

{{method.name}} -

# {{method.name}} -

Returns

Example

+

More information

+
diff --git a/docs/site/components/docs/docs.js b/docs/site/components/docs/docs.js index 880edee35b1..2927d32d4e9 100644 --- a/docs/site/components/docs/docs.js +++ b/docs/site/components/docs/docs.js @@ -184,7 +184,13 @@ angular }) .map(function(tag) { return $sce.trustAsHtml(formatComments(tag.string)); - })[0] + })[0], + docs: obj.tags.filter(function(tag) { + return tag.type === 'resource' + }) + .map(function(tag) { + return $sce.trustAsHtml(formatHtml(detectLinks(tag.string))); + }) }; }) .sort(compareMethods); diff --git a/docs/site/css/main.css b/docs/site/css/main.css index b3200580399..64b77bbeee1 100755 --- a/docs/site/css/main.css +++ b/docs/site/css/main.css @@ -933,6 +933,12 @@ ul { color: #888; } +.resource-links { + margin: 0; + padding: 8px; + background-color: #f5f8ff; +} + /* Page Title */ diff --git a/lib/bigquery/dataset.js b/lib/bigquery/dataset.js index 85941902e51..87adffc797c 100644 --- a/lib/bigquery/dataset.js +++ b/lib/bigquery/dataset.js @@ -56,6 +56,8 @@ function Dataset(bigQuery, id) { /** * Create a table given a tableId or configuration object. * + * @resource [Tables: insert API Documentation]{@link https://cloud.google.com/bigquery/docs/reference/v2/tables/insert} + * * @param {object} options - Table id or configuration object. * @param {string} options.id - The id of the table. * @param {string|object} options.schema - A comma-separated list of name:type @@ -117,6 +119,8 @@ Dataset.prototype.createTable = function(options, callback) { /** * Delete the dataset. * + * @resource [Datasets: delete API Documentation]{@link https://cloud.google.com/bigquery/docs/reference/v2/datasets/delete} + * * @param {object=} options - The configuration object. * @param {boolean} options.force - Force delete dataset and all tables. * Default: false. @@ -151,6 +155,8 @@ Dataset.prototype.delete = function(options, callback) { /** * Get the metadata for the Dataset. * + * @resource [Datasets: get API Documentation]{@link https://cloud.google.com/bigquery/docs/reference/v2/datasets/get} + * * @param {function} callback - The callback function. * @param {?error} callback.err - An error returned while making this request * @param {object} callback.metadata - The Dataset metadata @@ -176,6 +182,8 @@ Dataset.prototype.getMetadata = function(callback) { /** * Get a list of tables. * + * @resource [Tables: list API Documentation]{@link https://cloud.google.com/bigquery/docs/reference/v2/tables/list} + * * @param {object=} query - Configuration object. * @param {number} query.maxResults - Maximum number of results to return. * @param {string} query.pageToken - Token returned from a previous call, to @@ -271,6 +279,8 @@ Dataset.prototype.query = function(options, callback) { /** * Sets the metadata of the Dataset object. * + * @resource [Datasets: patch API Documentation]{@link https://cloud.google.com/bigquery/docs/reference/v2/datasets/patch} + * * @param {object} metadata - Metadata to save on the Dataset. * @param {function} callback - The callback function. * @param {?error} callback.err - An error returned while making this request diff --git a/lib/bigquery/index.js b/lib/bigquery/index.js index 2ba82cdff18..42d36873cb2 100644 --- a/lib/bigquery/index.js +++ b/lib/bigquery/index.js @@ -118,6 +118,8 @@ function BigQuery(options) { /** * Create a dataset. * + * @resource [Datasets: insert API Documentation]{@link https://cloud.google.com/bigquery/docs/reference/v2/datasets/insert} + * * @param {string} id - ID of the dataset to create. * @param {function} callback - The callback function. * @param {?error} callback.err - An error returned while making this request @@ -165,6 +167,8 @@ BigQuery.prototype.dataset = function(id) { /** * List all or some of the datasets in your project. * + * @resource [Datasets: list API Documentation]{@link https://cloud.google.com/bigquery/docs/reference/v2/datasets/list} + * * @param {object=} query - Configuration object. * @param {boolean} query.all - List all datasets, including hidden ones. * @param {boolean} query.autoPaginate - Have pagination handled automatically. @@ -260,6 +264,8 @@ BigQuery.prototype.getDatasets = function(query, callback) { /** * Get all of the jobs from your project. * + * @resource [Jobs: list API Documentation]{@link https://cloud.google.com/bigquery/docs/reference/v2/jobs/list} + * * @param {object=} options - Configuration object. * @param {boolean=} options.allUsers - Display jobs owned by all users in the * project. @@ -385,6 +391,8 @@ BigQuery.prototype.job = function(id) { * In cases where more results exist, this will automatically run the subsequent * queries for you, pushing each row to the stream. * + * @resource [Jobs: query API Documentation]{@link https://cloud.google.com/bigquery/docs/reference/v2/jobs/query} + * * @param {string|object} options - A string SQL query or configuration object. * @param {boolean} options.autoPaginate - Have pagination handled * automatically. Default: true. @@ -500,6 +508,8 @@ BigQuery.prototype.query = function(options, callback) { * ping for the results. See the Job documentation for explanations of how to * check on the status of the job. * + * @resource [Jobs: insert API Documentation]{@link https://cloud.google.com/bigquery/docs/reference/v2/jobs/insert} + * * @param {object|string} options - The configuration object. This must be in * the format of the [`configuration.query`](http://goo.gl/wRpHvR) property * of a Jobs resource. If a string is provided, this is used as the query diff --git a/lib/bigquery/job.js b/lib/bigquery/job.js index a3a104f5d4b..ebf2f9f9afd 100644 --- a/lib/bigquery/job.js +++ b/lib/bigquery/job.js @@ -60,6 +60,8 @@ function Job(bigQuery, id) { * Get the metadata of the job. This will mostly be useful for checking the * status of a previously-run job. * + * @resource [Jobs: get API Documentation]{@link https://cloud.google.com/bigquery/docs/reference/v2/jobs/get} + * * @param {function} callback - The callback function. * @param {?error} callback.err - An error returned while making this request * @param {object} callback.metadata - The metadata of the job. @@ -89,6 +91,8 @@ Job.prototype.getMetadata = function(callback) { /** * Get the results of a job. * + * @resource [Jobs: getQueryResults API Documentation]{@link https://cloud.google.com/bigquery/docs/reference/v2/jobs/getQueryResults} + * * @param {object=} options - Configuration object. * @param {boolean} options.autoPaginate - Have pagination handled * automatically. Default: true. diff --git a/lib/bigquery/table.js b/lib/bigquery/table.js index b9df298a4e0..d7a02d19c6f 100644 --- a/lib/bigquery/table.js +++ b/lib/bigquery/table.js @@ -133,6 +133,8 @@ Table.mergeSchemaWithRows_ = function(schema, rows) { /** * Copy data from one table to another, optionally creating that table. * + * @resource [Jobs: insert API Documentation]{@link https://cloud.google.com/bigquery/docs/reference/v2/jobs/insert} + * * @param {module:bigquery/table} destination - The destination table. * @param {object=} metadata - Metadata to set with the copy operation. The * metadata object should be in the format of the @@ -205,6 +207,8 @@ Table.prototype.copy = function(destination, metadata, callback) { * Create a readable stream of the rows of data in your table. This method is * simply a wrapper around {module:bigquery/table#getRows}. * + * @resource [Tabledata: list API Documentation]{@link https://cloud.google.com/bigquery/docs/reference/v2/tabledata/list} + * * @return {ReadStream} * * @example @@ -225,6 +229,8 @@ Table.prototype.createReadStream = function() { * Load data into your table from a readable stream of JSON or CSV-formatted * data. * + * @resource [Jobs: insert API Documentation]{@link https://cloud.google.com/bigquery/docs/reference/v2/jobs/insert} + * * @param {string|object=} metadata - Metadata to set with the load operation. * The metadata object should be in the format of the * [`configuration.load`](http://goo.gl/BVcXk4) property of a Jobs resource. @@ -332,6 +338,8 @@ Table.prototype.createWriteStream = function(metadata) { /** * Delete a table and all its data. * + * @resource [Tables: delete API Documentation]{@link https://cloud.google.com/bigquery/docs/reference/v2/tables/delete} + * * @param {function} callback - The callback function. * @param {?error} callback.err - An error returned while making this request * @param {object} callback.apiResponse - The full API response. @@ -346,6 +354,8 @@ Table.prototype.delete = function(callback) { /** * Export table to Google Cloud Storage. * + * @resource [Jobs: insert API Documentation]{@link https://cloud.google.com/bigquery/docs/reference/v2/jobs/insert} + * * @param {module:storage/file} destination - Where the file should be exported * to. * @param {object=} options - The configuration object. @@ -469,6 +479,8 @@ Table.prototype.export = function(destination, options, callback) { /** * Return the metadata associated with the Table. * + * @resource [Tables: get API Documentation]{@link https://cloud.google.com/bigquery/docs/reference/v2/tables/get} + * * @param {function} callback - The callback function. * @param {?error} callback.err - An error returned while making this request * @param {object} callback.metadata - The metadata of the Table. @@ -496,6 +508,8 @@ Table.prototype.getMetadata = function(callback) { * Retrieves table data from a specified set of rows. The rows are returned to * your callback as an array of objects matching your table's schema. * + * @resource [Tabledata: list API Documentation]{@link https://cloud.google.com/bigquery/docs/reference/v2/tabledata/list} + * * @param {object=} options - The configuration object. * @param {boolean} options.autoPaginate - Have pagination handled * automatically. Default: true. @@ -612,6 +626,8 @@ Table.prototype.getRows = function(options, callback) { * inferred by the given file's extension. If you wish to override this, you * must provide a `metadata` object. * + * @resource [Jobs: insert API Documentation]{@link https://cloud.google.com/bigquery/docs/reference/v2/jobs/insert} + * * @param {string|module:storage/file} source - The source file to import. * @param {object=} metadata - Metadata to set with the load operation. The * metadata object should be in the format of the @@ -740,6 +756,8 @@ Table.prototype.import = function(source, metadata, callback) { * recommended that you load data into BigQuery using * {module:bigquery/table#import} instead. * + * @resource [Tabledata: insertAll API Documentation]{@link https://cloud.google.com/bigquery/docs/reference/v2/tabledata/insertAll} + * * @param {object|object[]} rows - The rows to insert into the table. * @param {function} callback - The callback function. * @param {?error} callback.err - An error returned while making this request. @@ -836,6 +854,8 @@ Table.prototype.query = function(query, callback) { /** * Set the metadata on the table. * + * @resource [Tables: update API Documentation]{@link https://cloud.google.com/bigquery/docs/reference/v2/tables/update} + * * @param {object} metadata - The metadata key/value object to set. * @param {string} metadata.description - A user-friendly description of the * table. diff --git a/lib/datastore/dataset.js b/lib/datastore/dataset.js index a4fddb393aa..2c5f988562f 100644 --- a/lib/datastore/dataset.js +++ b/lib/datastore/dataset.js @@ -196,7 +196,7 @@ Dataset.prototype.key = function(options) { * Create a query from the current dataset to query the specified kind, scoped * to the namespace provided at the initialization of the dataset. * - * *[Reference](http://goo.gl/Cag0r6).* + * @resource [Datastore Queries]{@link http://goo.gl/Cag0r6} * * @borrows {module:datastore/query} as createQuery * @see {module:datastore/query} @@ -221,6 +221,8 @@ Dataset.prototype.createQuery = function(namespace, kind) { * provided in the callback function to commit your changes. See an example * below for more information. * + * @resource [Datasets: beginTransaction API Documentation]{@link https://cloud.google.com/datastore/docs/apis/v1beta2/datasets/beginTransaction} + * * @borrows {module:datastore/transaction#begin} as runInTransaction * * @param {function} fn - The function to run in the context of a transaction. diff --git a/lib/datastore/query.js b/lib/datastore/query.js index 0fd0806b7cc..b77d3b8458f 100644 --- a/lib/datastore/query.js +++ b/lib/datastore/query.js @@ -30,7 +30,7 @@ var extend = require('extend'); * {@linkcode module:datastore/dataset#createQuery} and run via * {@linkcode module:datastore/dataset#runQuery}.** * - * *[More information on queries](http://goo.gl/Cag0r6).* + * @resource [Datastore Queries]{@link http://goo.gl/Cag0r6} * * @constructor * @alias module:datastore/query @@ -91,7 +91,7 @@ Query.prototype.autoPaginate = function(autoPaginateVal) { * * *To filter by ancestors, see {@linkcode module:datastore/query#hasAncestor}.* * - * *[More information on filtering by properties](http://goo.gl/ENCx7e).* + * @resource [Datastore Filters]{@link https://cloud.google.com/datastore/docs/concepts/queries#Datastore_Filters} * * @param {string} filter - Property + Operator (=, <, >, <=, >=). * @param {*} value - Value to compare property to. @@ -126,7 +126,7 @@ Query.prototype.filter = function(filter, value) { /** * Filter a query by ancestors. * - * *[More information on filtering by ancestors](http://goo.gl/1qfpkZ).* + * @resource [Datastore Ancestor Filters]{@link https://cloud.google.com/datastore/docs/concepts/queries#Datastore_Ancestor_filters} * * @param {Key} key - Key object to filter by. * @return {module:datastore/query} @@ -144,7 +144,7 @@ Query.prototype.hasAncestor = function(key) { * Sort the results by a property name in ascending or descending order. By * default, an ascending sort order will be used. * - * *[More information on sort orders](http://goo.gl/mfegFR).* + * @resource [Datastore Sort Orders]{@link https://cloud.google.com/datastore/docs/concepts/queries#Datastore_Sort_orders} * * @param {string} property - Optional operator (+, -) and property to order by. * @return {module:datastore/query} @@ -188,7 +188,7 @@ Query.prototype.groupBy = function(fieldNames) { * * Queries that select a subset of properties are called Projection Queries. * - * *[More information on projection queries](http://goo.gl/EfsrJl).* + * @resource [Projection Queries]{@link https://cloud.google.com/datastore/docs/concepts/projectionqueries} * * @param {string|string[]} fieldNames - Properties to return from the matched * entities. @@ -210,7 +210,7 @@ Query.prototype.select = function(fieldNames) { /** * Set a starting cursor to a query. * - * *[More information on query cursors](http://goo.gl/WuTGRI).* + * @resource [Query Cursors]{@link https://cloud.google.com/datastore/docs/concepts/queries#Datastore_Query_cursors} * * @param {string} cursorToken - The starting cursor token. * @return {module:datastore/query} @@ -230,7 +230,7 @@ Query.prototype.start = function(start) { /** * Set an ending cursor to a query. * - * *[More information on query cursors](http://goo.gl/WuTGRI).* + * @resource [Query Cursors]{@link https://cloud.google.com/datastore/docs/concepts/queries#Datastore_Query_cursors} * * @param {string} cursorToken - The ending cursor token. * @return {module:datastore/query} @@ -250,7 +250,7 @@ Query.prototype.end = function(end) { /** * Set a limit on a query. * - * *[More information on query limits](http://goo.gl/f0VZ0n).* + * @resource [Query Limits]{@link https://cloud.google.com/datastore/docs/concepts/queries#Datastore_Retrieving_results} * * @param {number} n - The number of results to limit the query to. * @return {module:datastore/query} @@ -268,7 +268,7 @@ Query.prototype.limit = function(n) { /** * Set an offset on a query. * - * *[More information on query offsets](http://goo.gl/f0VZ0n).* + * @resource [Query Offsets]{@link https://cloud.google.com/datastore/docs/concepts/queries#Datastore_Retrieving_results} * * @param {number} n - The offset to start from after the start cursor. * @return {module:datastore/query} diff --git a/lib/datastore/request.js b/lib/datastore/request.js index 1a2ae66bd8b..014f6751398 100644 --- a/lib/datastore/request.js +++ b/lib/datastore/request.js @@ -99,6 +99,8 @@ function DatastoreRequest() {} * transaction. Get operations require a valid key to retrieve the * key-identified entity from Datastore. * + * @resource [Datasets: lookup API Documentation]{@link https://cloud.google.com/datastore/docs/apis/v1beta2/datasets/lookup} + * * @throws {Error} If at least one Key object is not provided. * * @param {Key|Key[]} keys - Datastore key object(s). @@ -216,6 +218,8 @@ DatastoreRequest.prototype.insert = function(entities, callback) { * included in *all* indexes, you must supply an entity's `data` property as an * array. See below for an example. * + * @resource [Datasets: commit API Documentation]{@link https://cloud.google.com/datastore/docs/apis/v1beta2/datasets/commit} + * * @borrows {module:datastore/transaction#save} as save * * @param {object|object[]} entities - Datastore key object(s). @@ -469,6 +473,8 @@ DatastoreRequest.prototype.save = function(entities, callback) { /** * Delete all entities identified with the specified key(s). * + * @resource [Datasets: commit API Documentation]{@link https://cloud.google.com/datastore/docs/apis/v1beta2/datasets/commit#mutation.delete} + * * @param {Key|Key[]} key - Datastore key object(s). * @param {function} callback - The callback function. * @param {?error} callback.err - An error returned while making this request @@ -521,6 +527,8 @@ DatastoreRequest.prototype.delete = function(keys, callback) { * * See below for examples of both approaches. * + * @resource [Datasets: runQuery API Documentation]{@link https://cloud.google.com/datastore/docs/apis/v1beta2/datasets/runQuery} + * * @param {module:datastore/query} q - Query object. * @param {function=} callback - The callback function. If omitted, a readable * stream instance is returned. @@ -622,6 +630,8 @@ DatastoreRequest.prototype.runQuery = function(query, callback) { /** * Generate IDs without creating entities. * + * @resource [Datasets: allocateIds API Documentation]{@link https://cloud.google.com/datastore/docs/apis/v1beta2/datasets/allocateIds} + * * @param {Key} incompleteKey - The key object to complete. * @param {number} n - How many IDs to generate. * @param {function} callback - The callback function. diff --git a/lib/datastore/transaction.js b/lib/datastore/transaction.js index fd9a1310c05..91f79187046 100644 --- a/lib/datastore/transaction.js +++ b/lib/datastore/transaction.js @@ -58,7 +58,7 @@ var extend = require('extend'); * {@linkcode module:datastore/dataset}. When you need to run a transactional * operation, use {@linkcode module:datastore/dataset#runInTransaction}. * - * *[Reference](http://goo.gl/n4oSjt).* + * @resource [Transactions Reference]{@link https://cloud.google.com/datastore/docs/concepts/transactions} * * @constructor * @alias module:datastore/transaction @@ -121,6 +121,8 @@ Transaction.prototype.begin_ = function(callback) { /** * Reverse a transaction remotely and finalize the current transaction instance. * + * @resource [Datasets: rollback API Documentation]{@link https://cloud.google.com/datastore/docs/apis/v1beta2/datasets/rollback} + * * @param {function} callback - The callback function. * @param {?error} callback.err - An error returned while making this request * @param {object} callback.apiResponse - The full API response. @@ -263,6 +265,8 @@ Transaction.prototype.commit_ = function(callback) { * Delete all entities identified with the specified key(s) in the current * transaction. * + * @resource [Datasets: commit API Documentation]{@link https://cloud.google.com/datastore/docs/apis/v1beta2/datasets/commit#mutation.delete} + * * @param {Key|Key[]} key - Datastore key object(s). * * @example @@ -304,6 +308,8 @@ Transaction.prototype.delete = function(entities) { * included in *all* indexes, you must supply an entity's `data` property as an * array. See below for an example. * + * @resource [Datasets: commit API Documentation]{@link https://cloud.google.com/datastore/docs/apis/v1beta2/datasets/commit} + * * @param {object|object[]} entities - Datastore key object(s). * @param {Key} entities.key - Datastore key object. * @param {object|object[]} entities.data - Data to save with the provided key. diff --git a/lib/dns/change.js b/lib/dns/change.js index e7a56f6133e..f069cadd866 100644 --- a/lib/dns/change.js +++ b/lib/dns/change.js @@ -49,6 +49,8 @@ function Change(zone, id) { /** * Get the metadata for the change in the zone. * + * @resource [Changes: get API Documentation]{@link https://cloud.google.com/dns/api/v1/changes/get} + * * @param {function} callback - The callback function. * @param {?error} callback.err - An API error. * @param {?object} callback.metadata - Metadata of the change from the API. diff --git a/lib/dns/index.js b/lib/dns/index.js index 6208dbfccd7..d7c1be3c990 100644 --- a/lib/dns/index.js +++ b/lib/dns/index.js @@ -98,6 +98,8 @@ function DNS(options) { /** * Create a managed zone. * + * @resource [ManagedZones: create API Documentation]{@link https://cloud.google.com/dns/api/v1/managedZones/create} + * * @throws {error} If a zone name is not provided. * @throws {error} If a zone dnsName is not provided. * @@ -152,6 +154,8 @@ DNS.prototype.createZone = function(name, config, callback) { /** * Gets a list of managed zones for the project. * + * @resource [ManagedZones: list API Documentation]{@link https://cloud.google.com/dns/api/v1/managedZones/list} + * * @param {object=} query - Query object. * @param {number} query.maxResults - Maximum number of results to return. * @param {string} query.pageToken - Page token. diff --git a/lib/dns/record.js b/lib/dns/record.js index 7bacfe7ad91..b7a184d88dd 100644 --- a/lib/dns/record.js +++ b/lib/dns/record.js @@ -110,6 +110,8 @@ Record.fromZoneRecord_ = function(zone, type, bindData) { * delete: record * }, function(err, change, apiResponse) {}); * + * @resource [ManagedZones: create API Documentation]{@link https://cloud.google.com/dns/api/v1/managedZones/create} + * * @param {function} callback - The callback function. * @param {?error} callback.err - An API error. * @param {?module:dns/change} callback.change - A {module:dns/change} object. diff --git a/lib/dns/zone.js b/lib/dns/zone.js index c60bf78b98a..af93c55852e 100644 --- a/lib/dns/zone.js +++ b/lib/dns/zone.js @@ -75,6 +75,8 @@ function Zone(dns, name) { * Add records to this zone. This is a convenience wrapper around * {module:dns/zone#createChange}. * + * @resource [ManagedZones: create API Documentation]{@link https://cloud.google.com/dns/api/v1/managedZones/create} + * * @param {module:dns/record|module:dns/record[]} record - The record objects to * add. * @param {?error} callback.err - An API error. @@ -109,6 +111,8 @@ Zone.prototype.change = function(id) { /** * Create a change of resource record sets for the zone. * + * @resource [ManagedZones: create API Documentation]{@link https://cloud.google.com/dns/api/v1/managedZones/create} + * * @param {object} options - The configuration object. * @param {module:dns/record|module:dns/record[]} options.add - Record objects * to add to this zone. @@ -180,6 +184,8 @@ Zone.prototype.createChange = function(options, callback) { * made (one to empty, another to delete), which means this is not an * atomic request. * + * @resource [ManagedZones: delete API Documentation]{@link https://cloud.google.com/dns/api/v1/managedZones/delete} + * * @param {object=} options - Configuration object. * @param {boolean} options.force - Empty the zone before deleting. * @param {function} callback - The callback function. @@ -231,6 +237,8 @@ Zone.prototype.delete = function(options, callback) { * delete), which means the operation is not atomic and could * result in unexpected changes. * + * @resource [ManagedZones: create API Documentation]{@link https://cloud.google.com/dns/api/v1/managedZones/create} + * * @param {module:dns/record|module:dns/record[]|string} record - If given a * string, it is interpreted as a record type. All records that match that * type will be retrieved and then deleted. You can also provide a @@ -304,6 +312,8 @@ Zone.prototype.deleteRecords = function(records, callback) { * {module:dns/zone#getRecords}, then use {module:dns/zone#createChange} to * create a deletion change. * + * @resource [ManagedZones: create API Documentation]{@link https://cloud.google.com/dns/api/v1/managedZones/create} + * * @param {function} callback - The callback function. * @param {?error} callback.err - An API error. * @param {?module:dns/change} callback.change - A {module:dns/change} object. @@ -333,6 +343,8 @@ Zone.prototype.empty = function(callback) { /** * Provide a path to a zone file to copy records into the zone. * + * @resource [ResourceRecordSets: list API Documentation]{@link https://cloud.google.com/dns/api/v1/resourceRecordSets/list} + * * @param {string} localPath - The fully qualified path to the zone file. * @param {function} callback - The callback function. * @param {?error} callback.err - An API or file system error. @@ -365,6 +377,8 @@ Zone.prototype.export = function(localPath, callback) { * Get the list of changes associated with this zone. A change is an atomic * update to a collection of records. * + * @resource [Changes: get API Documentation]{@link https://cloud.google.com/dns/api/v1/changes/get} + * * @param {object=} query - The query object. * @param {number} query.maxResults - Maximum number of results to return. * @param {string} query.pageToken - The page token. @@ -458,6 +472,8 @@ Zone.prototype.getChanges = function(query, callback) { /** * Get the metadata for the zone. * + * @resource [ManagedZones: get API Documentation]{@link https://cloud.google.com/dns/api/v1/managedZones/get} + * * @param {function} callback - The callback function. * @param {?error} callback.err - An API error. * @param {?object} callback.metadata - Metadata of the zone from the API. @@ -485,6 +501,8 @@ Zone.prototype.getMetadata = function(callback) { /** * Get the list of records for this zone. * + * @resource [ResourceRecordSets: list API Documentation]{@link https://cloud.google.com/dns/api/v1/resourceRecordSets/list} + * * @param {object=} query - The query object. * @param {string} query.name - Restricts the list to return only records with * this fully qualified domain name. @@ -619,6 +637,8 @@ Zone.prototype.getRecords = function(query, callback) { /** * Copy the records from a zone file into this zone. * + * @resource [ManagedZones: create API Documentation]{@link https://cloud.google.com/dns/api/v1/managedZones/create} + * * @param {string} localPath - The fully qualified path to the zone file. * @param {function} callback - The callback function. * @param {?error} callback.err - An API or file system error. @@ -719,6 +739,8 @@ Zone.prototype.record = function(type, metadata) { * replace them), which means the operation is not atomic and could result in * unexpected changes. * + * @resource [ManagedZones: create API Documentation]{@link https://cloud.google.com/dns/api/v1/managedZones/create} + * * @param {string|string[]} recordTypes - Type(s) of records to replace. * @param {module:dns/record|module:dns/record[]} newRecords - The record * objects to add. diff --git a/lib/pubsub/index.js b/lib/pubsub/index.js index 6810e288432..092a04be811 100644 --- a/lib/pubsub/index.js +++ b/lib/pubsub/index.js @@ -108,6 +108,8 @@ function PubSub(options) { * Get a list of the topics registered to your project. You may optionally * provide a query object as the first argument to customize the response. * + * @resource [Topics: list API Documentation]{@link https://cloud.google.com/pubsub/reference/rest/v1/projects.topics/list} + * * @param {object=} query - Query object. * @param {boolean} options.autoPaginate - Have pagination handled * automatically. Default: true. @@ -200,6 +202,8 @@ PubSub.prototype.getTopics = function(query, callback) { /** * Create a topic with the given name. * + * @resource [Topics: create API Documentation]{@link https://cloud.google.com/pubsub/reference/rest/v1/projects.topics/create} + * * @param {string} name - Name of the topic. * @param {function=} callback - The callback function. * @param {?error} callback.err - An error from the API call, may be null. @@ -234,6 +238,8 @@ PubSub.prototype.createTopic = function(name, callback) { * Your provided callback will be invoked with an error object if an API error * occurred or a {@linkcode module:pubsub/subscription} object. * + * @resource [Subscriptions: create API Documentation]{@link https://cloud.google.com/pubsub/reference/rest/v1/projects.subscriptions/create} + * * @throws {Error} If a Topic instance or topic name is not provided. * @throws {Error} If a subName is not provided. * @@ -396,6 +402,8 @@ PubSub.prototype.topic = function(name) { * * To get subscriptions for a topic, see {module:pubsub/topic}. * + * @resource [Subscriptions: list API Documentation]{@link https://cloud.google.com/pubsub/reference/rest/v1/projects.subscriptions/list} + * * @param {object=} options - Configuration object. * @param {boolean} options.autoPaginate - Have pagination handled * automatically. Default: true. diff --git a/lib/pubsub/subscription.js b/lib/pubsub/subscription.js index 3dfb26167ed..822f8ada001 100644 --- a/lib/pubsub/subscription.js +++ b/lib/pubsub/subscription.js @@ -279,6 +279,8 @@ Subscription.prototype.startPulling_ = function() { * Acknowledge to the backend that the message was retrieved. You must provide * either a single ackId or an array of ackIds. * + * @resource [Subscriptions: acknowledge API Documentation]{@link https://cloud.google.com/pubsub/reference/rest/v1/projects.subscriptions/acknowledge} + * * @throws {Error} If at least one ackId is not provided. * * @param {string|string[]} ackIds - An ackId or array of ackIds. @@ -321,6 +323,8 @@ Subscription.prototype.ack = function(ackIds, callback) { * Delete the subscription. Pull requests from the current subscription will be * errored once unsubscription is complete. * + * @resource [Subscriptions: delete API Documentation]{@link https://cloud.google.com/pubsub/reference/rest/v1/projects.subscriptions/delete} + * * @param {function=} callback - The callback function. * * @example @@ -351,6 +355,8 @@ Subscription.prototype.delete = function(callback) { * * @todo Should not be racing with other pull. * + * @resource [Subscriptions: pull API Documentation]{@link https://cloud.google.com/pubsub/reference/rest/v1/projects.subscriptions/pull} + * * @param {object=} options - Configuration object. * @param {boolean} options.returnImmediately - If set, the system will respond * immediately. Otherwise, wait until new messages are available. Returns if @@ -439,6 +445,8 @@ Subscription.prototype.pull = function(options, callback) { * to make the message available for redelivery if the processing was * interrupted. * + * @resource [Subscriptions: modifyAckDeadline API Documentation]{@link https://cloud.google.com/pubsub/reference/rest/v1/projects.subscriptions/modifyAckDeadline} + * * @param {object} options - The configuration object. * @param {number|number[]} options.ackIds - The ack id(s) to change. * @param {number} options.seconds - Number of seconds after call is made to diff --git a/lib/pubsub/topic.js b/lib/pubsub/topic.js index d9682467715..0723a2e1d19 100644 --- a/lib/pubsub/topic.js +++ b/lib/pubsub/topic.js @@ -95,6 +95,8 @@ Topic.formatName_ = function(projectId, name) { * Publish the provided message or array of messages. On success, an array of * messageIds is returned in the response. * + * @resource [Topics: publish API Documentation]{@link https://cloud.google.com/pubsub/reference/rest/v1/projects.topics/publish} + * * @throws {Error} If no message is provided. * @throws {Error} If a message is missing a data property. * @@ -172,6 +174,8 @@ Topic.prototype.publish = function(messages, callback) { /** * Delete the topic. This will not delete subscriptions to this topic. * + * @resource [Topics: delete API Documentation]{@link https://cloud.google.com/pubsub/reference/rest/v1/projects.topics/delete} + * * @param {function=} callback - The callback function. * * @example @@ -185,6 +189,8 @@ Topic.prototype.delete = function(callback) { /** * Get the official representation of this topic from the API. * + * @resource [Topics: get API Documentation]{@link https://cloud.google.com/pubsub/reference/rest/v1/projects.topics/get} + * * @param {function} callback - The callback function. * @param {?error} callback.err - An error returned while making this request. * @param {object} callback.metadata - The metadata of the Topic. @@ -211,6 +217,8 @@ Topic.prototype.getMetadata = function(callback) { * Your provided callback will be invoked with an error object if an API error * occurred or an array of {@linkcode module:pubsub/subscription} objects. * + * @resource [Subscriptions: list API Documentation]{@link https://cloud.google.com/pubsub/reference/rest/v1/projects.topics.subscriptions/list} + * * @param {object=} options - Configuration object. * @param {number=} options.pageSize - Maximum number of results to return. * @param {string=} options.pageToken - Page token. @@ -270,6 +278,8 @@ Topic.prototype.getSubscriptions = function(options, callback) { * Your provided callback will be invoked with an error object if an API error * occurred or a {@linkcode module:pubsub/subscription} object. * + * @resource [Subscriptions: create API Documentation]{@link https://cloud.google.com/pubsub/reference/rest/v1/projects.subscriptions/create} + * * @param {string} subName - The name of the subscription. * @param {object=} options - Configuration object. * @param {number=} options.ackDeadlineSeconds - The maximum time after diff --git a/lib/search/document.js b/lib/search/document.js index d65db8b29ca..29aea20e398 100644 --- a/lib/search/document.js +++ b/lib/search/document.js @@ -84,6 +84,8 @@ Document.prototype.addField = function(name) { /** * Delete this document. * + * @resource [Documents: delete API Documentation]{@link https://cloud.google.com/search/reference/rest/v1/projects/indexes/documents/delete} + * * @param {function=} callback - The callback function. * @param {?error} callback.err - An error returned while making this request * @param {object} callback.apiResponse - The full API response. @@ -102,6 +104,8 @@ Document.prototype.delete = function(callback) { * update the `fields` and `rank` properties to their most recent values at the * time of this call. * + * @resource [Documents: get API Documentation]{@link https://cloud.google.com/search/reference/rest/v1/projects/indexes/documents/get} + * * @param {function} callback - The callback function. * @param {?error} callback.err - An error returned while making this request * @param {module:search/document} callback.doc - The Document reference. diff --git a/lib/search/index-class.js b/lib/search/index-class.js index 639a9eab208..07db1bcf83a 100644 --- a/lib/search/index-class.js +++ b/lib/search/index-class.js @@ -64,6 +64,8 @@ function Index(search, id) { /** * Create a document in the index. * + * @resource [Documents: create API Documentation]{@link https://cloud.google.com/search/reference/rest/v1/projects/indexes/documents/create} + * * @param {object|module:search/document} documentObj - A properly-formed * Document object as outlined in the * [official docs](https://goo.gl/AYhSgI). @@ -145,6 +147,8 @@ Index.prototype.document = function(id) { /** * Get {module:search/document} objects for all of the documents in this index. * + * @resource [Documents: list API Documentation]{@link https://cloud.google.com/search/reference/rest/v1/projects/indexes/documents/list} + * * @param {object=} query - Query object. * @param {boolean} options.autoPaginate - Have pagination handled * automatically. Default: true. @@ -242,8 +246,7 @@ Index.prototype.getDocuments = function(query, callback) { /** * Run a query against the documents in this index. * - * For a full list of supported query parameters, see the - * [JSON API documentation](https://goo.gl/706zrP). + * @resource [Indexes: search API Documentation]{@link https://cloud.google.com/search/reference/rest/v1/projects/indexes/search} * * @throws {error} If a query string or object isn't provided. * diff --git a/lib/search/index.js b/lib/search/index.js index 8c9e5c02773..e73f9e4af97 100644 --- a/lib/search/index.js +++ b/lib/search/index.js @@ -97,6 +97,8 @@ function Search(options) { /** * Get {module:search/index} objects for all of the indexes in your project. * + * @resource [Indexes: list API Documentation]{@link https://cloud.google.com/search/reference/rest/v1/projects/indexes/list} + * * @param {object=} query - Query object. * @param {boolean} options.autoPaginate - Have pagination handled * automatically. Default: true. diff --git a/lib/storage/acl.js b/lib/storage/acl.js index 8de5d679a89..2267bbbca96 100644 --- a/lib/storage/acl.js +++ b/lib/storage/acl.js @@ -198,6 +198,9 @@ nodeutil.inherits(Acl, AclRoleAccessorMethods); /** * Add access controls on a {module:storage/bucket} or {module:storage/file}. * + * @resource [BucketAccessControls: insert API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/insert} + * @resource [ObjectAccessControls: insert API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/insert} + * * @param {object} options - Configuration object. * @param {string} options.entity - Whose permissions will be added. * @param {string} options.role - Permissions allowed for the defined entity. @@ -257,6 +260,9 @@ Acl.prototype.add = function(options, callback) { /** * Delete access controls on a {module:storage/bucket} or {module:storage/file}. * + * @resource [BucketAccessControls: delete API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/delete} + * @resource [ObjectAccessControls: delete API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/delete} + * * @param {object=} options - Configuration object. * @param {string} options.entity - Whose permissions will be revoked. * @param {int=} options.generation - **File Objects Only** Select a specific @@ -298,6 +304,9 @@ Acl.prototype.delete = function(options, callback) { * an entity is omitted, you will receive an array of all applicable access * controls. * + * @resource [BucketAccessControls: get API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/get} + * @resource [ObjectAccessControls: get API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/get} + * * @param {object|function} options - Configuration object. If you want to * receive a list of all access controls, pass the callback function as the * only argument. @@ -375,6 +384,9 @@ Acl.prototype.get = function(options, callback) { /** * Update access controls on a {module:storage/bucket} or {module:storage/file}. * + * @resource [BucketAccessControls: update API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/update} + * @resource [ObjectAccessControls: update API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/update} + * * @param {object=} options - Configuration object. * @param {string} options.entity - Whose permissions will be updated. * @param {string} options.role - Permissions allowed for the defined entity. diff --git a/lib/storage/bucket.js b/lib/storage/bucket.js index c63c1bab026..50d2c5cd137 100644 --- a/lib/storage/bucket.js +++ b/lib/storage/bucket.js @@ -111,9 +111,6 @@ function Bucket(storage, name) { * object or bucket (for example, `READ` or `WRITE`); the scope defines who * the permission applies to (for example, a specific user or group of users). * - * For more detailed information, see - * [About Access Control Lists](http://goo.gl/6qBBPO). - * * The `acl` object on a Bucket instance provides methods to get you a list of * the ACLs defined on your bucket, as well as set, update, and delete them. * @@ -124,6 +121,9 @@ function Bucket(storage, name) { * get, and update scopes and permissions for these as well with * {module:storage/bucket#acl.default}. * + * @resource [About Access Control Lists]{@link http://goo.gl/6qBBPO} + * @resource [Default ACLs]{@link https://cloud.google.com/storage/docs/accesscontrol#default} + * * @mixes module:storage/acl * * @example @@ -211,6 +211,8 @@ function Bucket(storage, name) { /** * Combine mutliple files into one new file. * + * @resource [Objects: compose API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/objects/compose} + * * @throws {Error} if a non-array is provided as sources argument. * @throws {Error} if less than two sources are provided. * @throws {Error} if no destination is provided. @@ -310,6 +312,8 @@ Bucket.prototype.combine = function(sources, destination, callback) { /** * Delete the bucket. * + * @resource [Buckets: delete API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/buckets/delete} + * * @param {function=} callback - The callback function. * @param {?error} callback.err - An error returned while making this request * @param {object} callback.apiResponse - The full API response. @@ -338,6 +342,8 @@ Bucket.prototype.delete = function(callback) { * The `query` object passed as the first argument will also be passed to * {module:storage/bucket#getFiles}. * + * @resource [Objects: delete API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/objects/delete} + * * @param {object=} query - Query object. See {module:storage/bucket#getFiles} * for all of the supported properties. * @param {boolean} query.force - Supress errors until all files have been @@ -443,6 +449,8 @@ Bucket.prototype.file = function(name, options) { /** * Get File objects for the files currently in the bucket. * + * @resource [Objects: list API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/objects/list} + * * @param {object=} query - Query object. * @param {boolean} query.autoPaginate - Have pagination handled automatically. * Default: true. @@ -569,6 +577,8 @@ Bucket.prototype.getFiles = function(query, callback) { * * To set metadata, see {module:storage/bucket#setMetadata}. * + * @resource [Buckets: get API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/buckets/get} + * * @param {function=} callback - The callback function. * @param {?error} callback.err - An error returned while making this request * @param {object} callback.metadata - Tbe bucket's metadata. @@ -605,6 +615,8 @@ Bucket.prototype.getMetadata = function(callback) { * NOTE: This may cause the process to be long-running and use a high number of * requests. Use with caution. * + * @resource [Buckets: patch API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/buckets/patch} + * * @param {object=} options - The configuration object. * @param {boolean} options.includeFiles - Make each file in the bucket private. * Default: `false`. @@ -712,6 +724,8 @@ Bucket.prototype.makePrivate = function(options, callback) { * NOTE: This may cause the process to be long-running and use a high number of * requests. Use with caution. * + * @resource [Buckets: patch API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/buckets/patch} + * * @param {object=} options - The configuration object. * @param {boolean} options.includeFiles - Make each file in the bucket publicly * readable. Default: `false`. @@ -804,6 +818,8 @@ Bucket.prototype.makePublic = function(options, callback) { /** * Set the bucket's metadata. * + * @resource [Buckets: patch API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/buckets/patch} + * * @param {object} metadata - The metadata you wish to set. * @param {function=} callback - The callback function. * @param {?error} callback.err - An error returned while making this request @@ -850,6 +866,8 @@ Bucket.prototype.setMetadata = function(metadata, callback) { * Upload a file to the bucket. This is a convenience method that wraps the * functionality provided by a File object, {module:storage/file}. * + * @resource [Objects: insert API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/objects/insert} + * * @param {string} localPath - The fully qualified path to the file you wish to * upload to your bucket. * @param {object=} options - Configuration options. diff --git a/lib/storage/file.js b/lib/storage/file.js index ac0f87585d6..0db38ea42b5 100644 --- a/lib/storage/file.js +++ b/lib/storage/file.js @@ -98,12 +98,11 @@ function File(bucket, name, options) { * object or bucket (for example, `READ` or `WRITE`); the scope defines who * the permission applies to (for example, a specific user or group of users). * - * For more detailed information, see - * [About Access Control Lists](http://goo.gl/6qBBPO). - * * The `acl` object on a File instance provides methods to get you a list of * the ACLs defined on your bucket, as well as set, update, and delete them. * + * @resource [About Access Control lists]{@link http://goo.gl/6qBBPO} + * * @mixes module:storage/acl * * @example @@ -132,6 +131,8 @@ function File(bucket, name, options) { * same bucket, but you can choose to copy it to another Bucket by providing * either a Bucket or File object. * + * @resource [Objects: copy API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/objects/copy} + * * @throws {Error} If the destination file is not provided. * * @param {string|module:storage/bucket|module:storage/file} destination - @@ -259,6 +260,8 @@ File.prototype.copy = function(destination, callback) { * triggered from either one of these API calls failing, which could leave a * duplicate file lingering. * + * @resource [Objects: copy API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/objects/copy} + * * @throws {Error} If the destination file is not provided. * * @param {string|module:storage/bucket|module:storage/file} destination - @@ -620,6 +623,8 @@ File.prototype.createReadStream = function(options) { * NOTE: Writable streams will emit the `complete` event when the file is fully * uploaded. * + * @resource [Objects: insert API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/objects/insert} + * * @param {object=} options - Configuration object. * @param {boolean} options.gzip - Automatically gzip the file. This will set * `options.metadata.contentEncoding` to `gzip`. @@ -846,6 +851,8 @@ File.prototype.createWriteStream = function(options) { /** * Delete the file. * + * @resource [Objects: delete API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/objects/delete} + * * @param {function=} callback - The callback function. * @param {?error} callback.err - An error returned while making this request * @param {object} callback.apiResponse - The full API response. @@ -935,6 +942,8 @@ File.prototype.download = function(options, callback) { /** * Get the file's metadata. * + * @resource [Objects: get API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/objects/get} + * * @param {function=} callback - The callback function. * @param {?error} callback.err - An error returned while making this request * @param {object} callback.metadata - The File's metadata. @@ -970,7 +979,7 @@ File.prototype.getMetadata = function(callback) { * Get a signed policy document to allow a user to upload data with a POST * request. * - * *[Reference](http://goo.gl/JWJEkG).* + * @resource [Policy Document Reference]{@link https://cloud.google.com/storage/docs/reference-methods#policydocument} * * @throws {Error} If an expiration timestamp from the past is given. * @throws {Error} If options.equals has an array with less or more than two @@ -1115,7 +1124,7 @@ File.prototype.getSignedPolicy = function(options, callback) { /** * Get a signed URL to allow limited time access to the file. * - * *[Reference](http://goo.gl/LcqhjU).* + * @resource [Signed URLs Reference]{@link https://cloud.google.com/storage/docs/access-control#Signed-URLs} * * @throws {Error} if an expiration timestamp from the past is given. * @@ -1223,6 +1232,8 @@ File.prototype.getSignedUrl = function(options, callback) { * * See the examples below for more information. * + * @resource [Objects: patch API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/objects/patch} + * * @param {object} metadata - The metadata you wish to update. * @param {function=} callback - The callback function. * @param {?error} callback.err - An error returned while making this request @@ -1276,6 +1287,8 @@ File.prototype.setMetadata = function(metadata, callback) { * Make a file private to the project and remove all other permissions. * Set `options.strict` to true to make the file private to only the owner. * + * @resource [Objects: patch API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/objects/patch} + * * @param {object=} options - The configuration object. * @param {boolean=} options.strict - If true, set the file to be private to * only the owner user. Otherwise, it will be private to the project. @@ -1324,6 +1337,8 @@ File.prototype.makePrivate = function(options, callback) { /** * Set a file to be publicly readable and maintain all previous permissions. * + * @resource [ObjectAccessControls: insert API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/insert} + * * @param {function=} callback - The callback function. * @param {?error} callback.err - An error returned while making this request. * @param {object} callback.apiResponse - The full API response. diff --git a/lib/storage/index.js b/lib/storage/index.js index 7c7c2af08a7..e5e37bbf584 100644 --- a/lib/storage/index.js +++ b/lib/storage/index.js @@ -115,8 +115,7 @@ function Storage(options) { * - `gcs.acl.READER_ROLE` - ("READER") * - `gcs.acl.WRITER_ROLE` - ("WRITER") * - * For more detailed information, see - * [About Access Control Lists](http://goo.gl/6qBBPO). + * @resource [About Access Control Lists]{@link https://cloud.google.com/storage/docs/access-control#About-Access-Control-Lists} * * @type {object} * @@ -184,6 +183,8 @@ Storage.prototype.bucket = function(name) { /** * Create a bucket. * + * @resource [Buckets: insert API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/buckets/insert} + * * @throws {Error} If a name is not provided. * * @param {string} name - Name of the bucket to create. @@ -254,6 +255,8 @@ Storage.prototype.createBucket = function(name, metadata, callback) { /** * Get Bucket objects for all of the buckets in your project. * + * @resource [Buckets: list API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/buckets/list} + * * @param {object=} query - Query object. * @param {boolean} options.autoPaginate - Have pagination handled * automatically. Default: true.