Skip to content

Commit 01ec51f

Browse files
jgeewaxstephenplusplus
authored andcommitted
Add callback documentation to some pubsub methods.
1 parent 772f89e commit 01ec51f

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

lib/pubsub/index.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@ function PubSub(options) {
103103
* @param {string=} query.pageToken - Page token.
104104
* @param {number=} query.pageSize - Max number of results to return.
105105
* @param {function} callback - The callback function.
106+
* @param {?error} callback.err - An error from the API call, may be null.
107+
* @param {module:pubsub/topic[]} callback.topics - The list of topics returned.
108+
* @param {object} callback.nextQuery - A query object representing the next
109+
* page of topics.
110+
* @param {object} callback.apiResponse - The full API response from the
111+
* service.
106112
*
107113
* @example
108114
* // Get all topics.
@@ -147,6 +153,10 @@ PubSub.prototype.getTopics = function(query, callback) {
147153
*
148154
* @param {string} name - Name of the topic.
149155
* @param {function=} callback - The callback function.
156+
* @param {?error} callback.err - An error from the API call, may be null.
157+
* @param {module:pubsub/topic} callback.topic - The newly created topic.
158+
* @param {object} callback.apiResponse - The full API response from the
159+
* service.
150160
*
151161
* @example
152162
* pubsub.createTopic('my-new-topic', function(err, topic, apiResponse) {
@@ -341,6 +351,13 @@ PubSub.prototype.topic = function(name, options) {
341351
* @param {number} options.pageSize - Maximum number of results to return.
342352
* @param {string} options.pageToken - Page token.
343353
* @param {function} callback - The callback function.
354+
* @param {?error} callback.err - An error from the API call, may be null.
355+
* @param {module:pubsub/subscription[]} callback.subscriptions - The list of
356+
* subscriptions returned.
357+
* @param {object} callback.nextQuery - A query object representing the next
358+
* page of topics.
359+
* @param {object} callback.apiResponse - The full API response from the
360+
* service.
344361
*
345362
* @example
346363
* var callback = function(err, subscriptions, nextQuery, apiResponse) {

0 commit comments

Comments
 (0)