diff --git a/lib/bigquery/dataset.js b/lib/bigquery/dataset.js index 2ebcf3413cd..eef1a72deab 100644 --- a/lib/bigquery/dataset.js +++ b/lib/bigquery/dataset.js @@ -64,6 +64,9 @@ function Dataset(bigQuery, id) { * JSON array of fields, which allows for nested and repeated fields. See * a [Table resource](http://goo.gl/sl8Dmg) for more detailed information. * @param {function} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request + * @param {module:bigquery/table} callback.table - The newly created table. + * @param {object} callback.apiResponse - The full API response. * * @example * var tableConfig = { @@ -117,6 +120,8 @@ Dataset.prototype.createTable = function(options, callback) { * @param {boolean} options.force - Force delete dataset and all tables. * Default: false. * @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. * * @example * //- @@ -146,6 +151,9 @@ Dataset.prototype.delete = function(options, callback) { * Get the metadata for the Dataset. * * @param {function} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request + * @param {object} callback.metadata - The Dataset metadata + * @param {object} callback.apiResponse - The full API response. * * @example * dataset.getMetadata(function(err, metadata, apiResponse) {}); @@ -172,6 +180,12 @@ Dataset.prototype.getMetadata = function(callback) { * @param {string} query.pageToken - Token returned from a previous call, to * request the next page of results. * @param {function} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request + * @param {module:bigquery/table[]} callback.tables - The list of tables from + * your Dataset. + * @param {?object} callback.nextQuery - If present, query with this object to + * check for more results. + * @param {object} callback.apiResponse - The full API response. * * @example * dataset.getTables(function(err, tables, nextQuery, apiResponse) { @@ -238,6 +252,9 @@ Dataset.prototype.query = function(options, callback) { * * @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 + * @param {object} callback.metadata - The metadata of the Dataset object. + * @param {object} callback.apiResponse - The full API response. * * @example * var metadata = { diff --git a/lib/bigquery/index.js b/lib/bigquery/index.js index 6cf5dafa4e8..723e9355bb7 100644 --- a/lib/bigquery/index.js +++ b/lib/bigquery/index.js @@ -119,6 +119,9 @@ function BigQuery(options) { * * @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 + * @param {module:bigquery/dataset} callback.dataset - The newly created dataset + * @param {object} callback.apiResponse - The full API response. * * @example * bigquery.createDataset('my-dataset', function(err, dataset, apiResponse) {}); @@ -168,7 +171,13 @@ BigQuery.prototype.dataset = function(id) { * @param {number} query.maxResults - Maximum number of results to return. * @param {string} query.pageToken - Token returned from a previous call, to * request the next page of results. - * @param {function} callback - The callback function. + * @param {function=} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request + * @param {module:bigquery/dataset[]} callback.datasets - The list of datasets + * in your project. + * @param {?object} callback.nextQuery - If present, query with this object to + * check for more results. + * @param {object} callback.apiResponse - The full API response. * * @example * bigquery.getDatasets(function(err, datasets) { @@ -263,7 +272,13 @@ BigQuery.prototype.getDatasets = function(query, callback) { * "minimal", to not include the job configuration. * @param {string=} options.stateFilter - Filter for job state. Acceptable * values are "done", "pending", and "running". - * @param {function} callback - The callback function. + * @param {function=} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request + * @param {module:bigquery/job[]} callback.jobs - The list of jobs in your + * project. + * @param {?object} callback.nextQuery - If present, query with this object to + * check for more results. + * @param {object} callback.apiResponse - The full API response. * * @example * bigquery.getJobs(function(err, jobs) { @@ -380,6 +395,11 @@ BigQuery.prototype.job = function(id) { * immediately. If the timeout passes before the job completes, the request * will fail with a `TIMEOUT` error. * @param {function=} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request + * @param {array} callback.rows - The list of results from your query. + * @param {?object} callback.nextQuery - If present, query with this object to + * check for more results. + * @param {object} callback.apiResponse - The full API response. * * @example * var query = 'SELECT url FROM [publicdata:samples.github_nested] LIMIT 100'; @@ -488,6 +508,10 @@ BigQuery.prototype.query = function(options, callback) { * @param {string} options.query - A query string, following the BigQuery query * syntax, of the query to execute. * @param {function} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request. + * @param {module:bigquery/job} callback.job - The newly created job for your + query. + * @param {object} callback.apiResponse - The full API response. * * @throws {Error} If a query is not specified. * @throws {Error} If a Table is not provided as a destination. diff --git a/lib/bigquery/job.js b/lib/bigquery/job.js index 881f786951b..0ab579ea6d5 100644 --- a/lib/bigquery/job.js +++ b/lib/bigquery/job.js @@ -65,6 +65,9 @@ function Job(bigQuery, id) { * status of a previously-run job. * * @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. + * @param {object} callback.apiResponse - The full API response. * * @example * var job = bigquery.job('id'); @@ -105,6 +108,11 @@ Job.prototype.getMetadata = function(callback) { * @param {function=} callback - The callback function. If you intend to * continuously run this query until all results are in as part of a stream, * do not pass a callback. + * @param {?error} callback.err - An error returned while making this request + * @param {array} callback.rows - The results of a job. + * @param {?object} callback.nextQuery - If present, query with this object to + * check for more results. + * @param {object} callback.apiResponse - The full API response. * * @example * var callback = function(err, rows, nextQuery, apiResponse) { diff --git a/lib/bigquery/table.js b/lib/bigquery/table.js index 7e400c8cd1e..915d987e2c5 100644 --- a/lib/bigquery/table.js +++ b/lib/bigquery/table.js @@ -135,6 +135,9 @@ Table.mergeSchemaWithRows_ = function(schema, rows) { * metadata object should be in the format of the * [`configuration.copy`](http://goo.gl/dKWIyS) property of a Jobs resource. * @param {function} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request + * @param {module:bigquery/job} callback.job - The job used to copy your table. + * @param {object} callback.apiResponse - The full API response. * * @throws {Error} If a destination other than a Table object is provided. * @@ -327,6 +330,8 @@ Table.prototype.createWriteStream = function(metadata) { * Delete a table and all its data. * * @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. * * @example * table.delete(function(err, apiResponse) {}); @@ -346,6 +351,9 @@ Table.prototype.delete = function(callback) { * @param {boolean} options.gzip - Specify if you would like the file compressed * with GZIP. Default: false. * @param {function} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request + * @param {module:bigquery/job} callback.job - The job used to export the table. + * @param {object} callback.apiResponse - The full API response. * * @throws {Error} If destination isn't a File object. * @throws {Error} If destination format isn't recongized. @@ -459,6 +467,9 @@ Table.prototype.export = function(destination, options, callback) { * Return the metadata associated with the Table. * * @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. + * @param {object} callback.apiResponse - The full API response. * * @example * table.getMetadata(function(err, metadata, apiResponse) {}); @@ -487,6 +498,11 @@ Table.prototype.getMetadata = function(callback) { * automatically. Default: true. * @param {number} options.maxResults - Maximum number of results to return. * @param {function} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request + * @param {array} callback.rows - The table data from specified set of rows. + * @param {?object} callback.nextQuery - If present, query with this object to + * check for more results. + * @param {object} callback.apiResponse - The full API response. * * @example * table.getRows(function(err, rows) { @@ -598,6 +614,9 @@ Table.prototype.getRows = function(options, callback) { * metadata object should be in the format of the * [`configuration.load`](http://goo.gl/BVcXk4) property of a Jobs resource. * @param {function} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request + * @param {module:bigquery/job} callback.job - The job used to import your data. + * @param {object} callback.apiResponse - The full API response. * * @throws {Error} If the source isn't a string file name or a File instance. * @@ -720,6 +739,9 @@ Table.prototype.import = function(source, metadata, callback) { * * @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. + * @param {array} callback.insertErrors - A list of errors for insert failures. + * @param {object} callback.apiResponse - The full API response. * * @example * //- @@ -822,6 +844,9 @@ Table.prototype.query = function(query, callback) { * JSON array of fields, which allows for nested and repeated fields. See * a [Table resource](http://goo.gl/sl8Dmg) for more detailed information. * @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. + * @param {object} callback.apiResponse - The full API response. * * @example * var metadata = { diff --git a/lib/datastore/dataset.js b/lib/datastore/dataset.js index 01aab03d366..2a49708fe35 100644 --- a/lib/datastore/dataset.js +++ b/lib/datastore/dataset.js @@ -222,7 +222,11 @@ Dataset.prototype.createQuery = function(namespace, kind) { * @borrows {module:datastore/transaction#begin} as runInTransaction * * @param {function} fn - The function to run in the context of a transaction. + * @param {module:datastore/transaction} fn.transaction - The Transaction. + * @param {function} fn.done - Function used to commit changes. * @param {function} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request + * * * @example * dataset.runInTransaction(function(transaction, done) { diff --git a/lib/datastore/request.js b/lib/datastore/request.js index 74de8c83e30..59e8e84ba49 100644 --- a/lib/datastore/request.js +++ b/lib/datastore/request.js @@ -94,6 +94,10 @@ function DatastoreRequest() {} * * @param {Key|Key[]} keys - Datastore key object(s). * @param {function} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request + * @param {module:datastore/entity|module:datastore/entity[]} callback.entity - + * Will return either a single Entity or a list of Entities + * @param {object} callback.apiResponse - The full API response. * * @example * //- @@ -188,6 +192,8 @@ DatastoreRequest.prototype.insert = function(entities, callback) { * `name` for the name of the property and `value` for its value. You may * also specify an `excludeFromIndexes` property, set to `true` or `false`. * @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. * * @example * //- @@ -430,6 +436,8 @@ DatastoreRequest.prototype.save = function(entities, callback) { * * @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 + * @param {object} callback.apiResponse - The full API response. * * @example * //- @@ -489,6 +497,11 @@ DatastoreRequest.prototype.delete = function(keys, callback) { * @param {?module:datastore/query} callback.nextQuery - If present, run another * query with this object to check for more results. * @param {object} callback.apiResponse - The full API response. + * @param {?error} callback.err - An error returned while making this request + * @param {module:datastore/entity[]} callback.entities - A list of Entities + * @param {?object} callback.nextQuery - If present, query with this object to + * check for more results. + * @param {object} callback.apiResponse - The full API response. * * @example * //- @@ -577,6 +590,9 @@ DatastoreRequest.prototype.runQuery = function(query, callback) { * @param {Key} incompleteKey - The key object to complete. * @param {number} n - How many IDs to generate. * @param {function} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request + * @param {array} callback.keys - The generated IDs + * @param {object} callback.apiResponse - The full API response. * * @example * //- diff --git a/lib/datastore/transaction.js b/lib/datastore/transaction.js index b9e3852858a..9cb6d92af70 100644 --- a/lib/datastore/transaction.js +++ b/lib/datastore/transaction.js @@ -121,9 +121,11 @@ Transaction.prototype.begin_ = function(callback) { * Reverse a transaction remotely and finalize the current transaction instance. * * @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. * * @example - * transaction.rollback(function(err) { + * transaction.rollback(function(err, apiResponse) { * if (err) { * // Transaction could not be rolled back. * } diff --git a/lib/pubsub/index.js b/lib/pubsub/index.js index 70ad17f8ed5..1de3f6622b5 100644 --- a/lib/pubsub/index.js +++ b/lib/pubsub/index.js @@ -248,6 +248,9 @@ PubSub.prototype.createTopic = function(name, callback) { * false, attempting to create a subscription that already exists will fail. * (default: false) * @param {function} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request + * @param {module:pubsub/subscription} callback.subscription - The subscription. + * @param {object} callback.apiResponse - The full API response. * * @example * //- diff --git a/lib/search/document.js b/lib/search/document.js index 39add68b8b2..c3515ca905b 100644 --- a/lib/search/document.js +++ b/lib/search/document.js @@ -83,6 +83,8 @@ Document.prototype.addField = function(name) { * Delete this document. * * @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. * * @example * document.delete(function(err, apiResponse) {}); @@ -99,6 +101,9 @@ Document.prototype.delete = function(callback) { * time of this call. * * @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. + * @param {object} callback.apiResponse - The full API response. * * @example * document.getMetadata(function(err, doc, apiResponse) { diff --git a/lib/search/index-class.js b/lib/search/index-class.js index e5366d7b683..201bfc54274 100644 --- a/lib/search/index-class.js +++ b/lib/search/index-class.js @@ -73,6 +73,9 @@ function Index(search, id) { * Document object as outlined in the * [official docs](https://goo.gl/AYhSgI). * @param {function} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request + * @param {module:search/document} callback.document - The Document object. + * @param {object} callback.apiResponse - The full API response. * * @example * //- @@ -156,7 +159,12 @@ Index.prototype.document = function(id) { * representing part of the larger set of results to view. * @param {string} query.view - One of `INDEX_VIEW_UNSPECIFIED`, `ID_ONLY`, or * `FULL`. See [this table](https://goo.gl/sY6Lpt) for more details. - * @param {function} callback - The callback function. + * @param {function=} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request + * @param {module:search/document[]} callback.documents - A list of Documents. + * @param {?object} callback.nextQuery - If present, query with this object to + * check for more results. + * @param {object} callback.apiResponse - The full API response. * * @example * index.getDocuments(function(err, documents) { @@ -254,6 +262,11 @@ Index.prototype.getDocuments = function(query, callback) { * @param {string} query.query = A query string using the syntax described by * the [official docs](https://goo.gl/2SYl3S). * @param {function} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request + * @param {module:search/document[]} callback.documents - A list of Documents + * @param {?object} callback.nextQuery - If present, query with this object to + * check for more results. + * @param {object} callback.apiResponse - The full API response. * * @example * var query = 'person:stephen'; diff --git a/lib/search/index.js b/lib/search/index.js index 75f109bceb4..ff35a589749 100644 --- a/lib/search/index.js +++ b/lib/search/index.js @@ -107,6 +107,11 @@ function Search(options) { * @param {string} query.view - See [this table](https://goo.gl/sY6Lpt) for a * list of accepted values and what each will do. * @param {function} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request + * @param {module:search/index[]} callback.indexes - A list of Indexes. + * @param {?object} callback.nextQuery - If present, query with this object to + * check for more results. + * @param {object} callback.apiResponse - The full API response. * * @example * search.getIndexes(function(err, indexes) { diff --git a/lib/storage/acl.js b/lib/storage/acl.js index 60a90209f5c..99be95da42b 100644 --- a/lib/storage/acl.js +++ b/lib/storage/acl.js @@ -210,6 +210,9 @@ nodeutil.inherits(Acl, AclRoleAccessorMethods); * @param {int=} options.generation - **File Objects Only** Select a specific * revision of this file (as opposed to the latest version, the default). * @param {function} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request + * @param {object} callback.aclObject - The Acl Object. + * @param {object} callback.apiResponse - The full API response. * * @alias acl.add * @@ -264,6 +267,8 @@ Acl.prototype.add = function(options, callback) { * @param {int=} options.generation - **File Objects Only** Select a specific * revision of this file (as opposed to the latest version, the default). * @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. * * @alias acl.delete * @@ -305,6 +310,9 @@ Acl.prototype.delete = function(options, callback) { * @param {int=} options.generation - **File Objects Only** Select a specific * revision of this file (as opposed to the latest version, the default). * @param {function} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request + * @param {object|array} callback.aclObject - Single or Array of Acl Objects. + * @param {object} callback.apiResponse - The full API response. * * @alias acl.get * @@ -379,6 +387,9 @@ Acl.prototype.get = function(options, callback) { * @param {int=} options.generation - **File Objects Only** Select a specific * revision of this file (as opposed to the latest version, the default). * @param {function} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request + * @param {object} callback.aclObject - The updated Acl Object. + * @param {object} callback.apiResponse - The full API response. * * @alias acl.update * @@ -390,7 +401,7 @@ Acl.prototype.get = function(options, callback) { * myBucket.acl.update({ * entity: 'user-useremail@example.com', * role: gcs.acl.WRITER_ROLE - * }, function(err, apiResponse) {}); + * }, function(err, aclObject, apiResponse) {}); * * //- * // For file ACL operations, you can also specify a `generation` property. @@ -399,7 +410,7 @@ Acl.prototype.get = function(options, callback) { * entity: 'user-useremail@example.com', * role: gcs.acl.WRITER_ROLE, * generation: 1 - * }, function(err, apiResponse) {}); + * }, function(err, aclObject, apiResponse) {}); */ Acl.prototype.update = function(options, callback) { var that = this; diff --git a/lib/storage/bucket.js b/lib/storage/bucket.js index d8e87249666..c6c554f64e0 100644 --- a/lib/storage/bucket.js +++ b/lib/storage/bucket.js @@ -219,6 +219,9 @@ function Bucket(storage, name) { * @param {string|module:storage/file} destination - The file you would like the * source files combined into. * @param {function=} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request + * @param {module:storage/file} callback.newFile - The combined file. + * @param {object} callback.apiResponse - The full API response. * * @example * var logBucket = gcs.bucket('log-bucket'); @@ -306,6 +309,8 @@ Bucket.prototype.combine = function(sources, destination, callback) { * Delete the bucket. * * @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. * * @example * var bucket = gcs.bucket('delete-me'); @@ -470,7 +475,12 @@ Bucket.prototype.file = function(name, options) { * representing part of the larger set of results to view. * @param {bool} query.versions - If true, returns File objects scoped to their * versions. - * @param {function} callback - The callback function. + * @param {function=} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request + * @param {module:storage/file[]} callback.files - List of files. + * @param {?object} callback.nextQuery - If present, query with this object to + * check for more results. + * @param {object} callback.apiResponse - The full API response. * * @example * bucket.getFiles(function(err, files) { @@ -576,6 +586,9 @@ Bucket.prototype.getFiles = function(query, callback) { * To set metadata, see {module:storage/bucket#setMetadata}. * * @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. + * @param {object} callback.apiResponse - The full API response. * * @example * bucket.getMetadata(function(err, metadata, apiResponse) {}); @@ -614,6 +627,8 @@ Bucket.prototype.getMetadata = function(callback) { * @param {boolean} options.force - Queue errors occurred while making files * private until all files have been processed. * @param {function} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request + * @param {module:storage/file[]} callback.files - List of files made private. * * @example * //- @@ -719,6 +734,8 @@ Bucket.prototype.makePrivate = function(options, callback) { * @param {boolean} options.force - Queue errors occurred while making files * public until all files have been processed. * @param {function} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request + * @param {module:storage/file[]} callback.files - List of files made public. * * @example * //- @@ -805,6 +822,9 @@ Bucket.prototype.makePublic = function(options, callback) { * * @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 + * @param {object} callback.metadata - The bucket's metadata. + * @param {object} callback.apiResponse - The full API response. * * @example * //- @@ -864,6 +884,9 @@ Bucket.prototype.setMetadata = function(metadata, callback) { * completely consumed. Because of this, it's best for you to be explicit * for what makes sense given your input. * @param {function} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request + * @param {module:storage/file} callback.file - The uploaded File. + * @param {object} callback.apiResponse - The full API response. * @param {string|boolean} options.validation - Possible values: `"md5"`, * `"crc32c"`, or `false`. By default, data integrity is validated with an * MD5 checksum for maximum reliability. CRC32c will provide better diff --git a/lib/storage/file.js b/lib/storage/file.js index 8f9688d1489..528828da377 100644 --- a/lib/storage/file.js +++ b/lib/storage/file.js @@ -134,6 +134,9 @@ function File(bucket, name, options) { * @param {string|module:storage/bucket|module:storage/file} destination - * Destination file. * @param {function=} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request + * @param {module:storage/file} callback.copiedFile - The copied File. + * @param {object} callback.apiResponse - The full API response. * * @example * //- @@ -258,6 +261,9 @@ File.prototype.copy = function(destination, callback) { * @param {string|module:storage/bucket|module:storage/file} destination - * Destination file. * @param {function=} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request + * @param {module:storage/file} callback.destinationFile - The destination File. + * @param {object} callback.apiResponse - The full API response. * * @example * //- @@ -767,6 +773,8 @@ File.prototype.createWriteStream = function(options) { * Delete the file. * * @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. * * @example * file.delete(function(err, apiResponse) {}); @@ -800,6 +808,8 @@ File.prototype.delete = function(callback) { * @param {string} options.destination - Local file path to write the file's * contents to. * @param {function} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request + * @param {buffer} callback.contents - The contents of a File. * * @example * //- @@ -852,6 +862,9 @@ File.prototype.download = function(options, callback) { * Get the file's metadata. * * @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. + * @param {object} callback.apiResponse - The full API response. * * @example * file.getMetadata(function(err, metadata, apiResponse) {}); @@ -917,6 +930,9 @@ File.prototype.getMetadata = function(callback) { * request's content length. * @param {number} options.contentLengthRange.max - Maximum value for the * request's content length. + * @param {function} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request + * @param {object} callback.policy - The document policy. * * @example * file.getSignedPolicy({ @@ -1049,6 +1065,8 @@ File.prototype.getSignedPolicy = function(options, callback) { * @param {string=} options.responseType - The response-content-type parameter * of the signed url. * @param {function=} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request + * @param {string} callback.url - The signed URL. * * @example * file.getSignedUrl({ @@ -1133,6 +1151,9 @@ File.prototype.getSignedUrl = function(options, callback) { * * @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 + * @param {object} callback.metadata - The File's metadata. + * @param {object} callback.apiResponse - The full API response. * * @example * file.setMetadata({ @@ -1185,6 +1206,7 @@ File.prototype.setMetadata = function(metadata, callback) { * @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. * @param {function=} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request * * @example * @@ -1229,6 +1251,8 @@ File.prototype.makePrivate = function(options, callback) { * Set a file to be publicly readable and maintain all previous permissions. * * @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. * * @example * file.makePublic(function(err, apiResponse) {}); diff --git a/lib/storage/index.js b/lib/storage/index.js index 62eba5ab79a..7c7c2af08a7 100644 --- a/lib/storage/index.js +++ b/lib/storage/index.js @@ -189,6 +189,9 @@ Storage.prototype.bucket = function(name) { * @param {string} name - Name of the bucket to create. * @param {object=} metadata - Metadata to set for the bucket. * @param {function} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request + * @param {module:storage/bucket} callback.bucket - The newly created Bucket. + * @param {object} callback.apiResponse - The full API response. * * @example * var callback = function(err, bucket, apiResponse) { @@ -258,7 +261,12 @@ Storage.prototype.createBucket = function(name, metadata, callback) { * return. * @param {string} query.pageToken - A previously-returned page token * representing part of the larger set of results to view. - * @param {function} callback - The callback function. + * @param {function=} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request + * @param {module:storage/bucket[]} callback.buckets - List of all Buckets. + * @param {?object} callback.nextQuery - If present, query with this object to + * check for more results. + * @param {object} callback.apiResponse - The full API response. * * @example * gcs.getBuckets(function(err, buckets) { @@ -271,7 +279,7 @@ Storage.prototype.createBucket = function(name, metadata, callback) { * // To control how many API requests are made and page through the results * // manually, set `autoPaginate` to `false`. * //- - * var callback = function(err, buckets, nextQuery) { + * var callback = function(err, buckets, nextQuery, apiResponse) { * if (nextQuery) { * // More results exist. * gcs.getBuckets(nextQuery, callback);