dis+/node_modules/@google-cloud/pubsub/build/src/v1/subscriber_client.js
/**
     * Lists matching subscriptions.
     *
     * @param {Object} request
     *   The request object that will be sent.
     * @param {string} request.project
     *   Required. The name of the project in which to list subscriptions.
     *   Format is `projects/{project-id}`.
     * @param {number} request.pageSize
     *   Maximum number of subscriptions to return.
     * @param {string} request.pageToken
     *   The value returned by the last `ListSubscriptionsResponse`; indicates that
     *   this is a continuation of a prior `ListSubscriptions` call, and that the
     *   system should return the next page of data.
     * @param {object} [options]
     *   Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
     * @returns {Promise} - The promise which resolves to an array.
     *   The first element of the array is Array of [Subscription]{@link google.pubsub.v1.Subscription}.
     *   The client library will perform auto-pagination by default: it will call the API as many
     *   times as needed and will merge results from all the pages into this array.
     *   Note that it can affect your quota.
     *   We recommend using `listSubscriptionsAsync()`
     *   method described below for async iteration which you can stop as needed.
     *   Please see the
     *   [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
     *   for more details and examples.
     */
Lists matching subscriptions.
@param {Object} request
The request object that will be sent.
Lists matching subscriptions . @param { Object } request The request object that will be sent .
listSubscriptions(request, optionsOrCallback, callback) {
        request = request || {};
        let options;
        if (typeof optionsOrCallback === 'function' && callback === undefined) {
            callback = optionsOrCallback;
            options = {};
        }
        else {
            options = optionsOrCallback;
        }
        options = options || {};
        options.otherArgs = options.otherArgs || {};
        options.otherArgs.headers = options.otherArgs.headers || {};
        options.otherArgs.headers['x-goog-request-params'] =
            gax.routingHeader.fromParams({
                project: request.project || '',
            });
        this.initialize();
        return this.innerApiCalls.listSubscriptions(request, options, callback);
    }
listSubscriptions ( request , optionsOrCallback , callback ) { request = request || { } ; let options ; if ( typeof optionsOrCallback === 'function' && callback === undefined ) { callback = optionsOrCallback ; options = { } ; } else { options = optionsOrCallback ; } options = options || { } ; options . otherArgs = options . otherArgs || { } ; options . otherArgs . headers = options . otherArgs . headers || { } ; options . otherArgs . headers [ 'x-goog-request-params' ] = gax . routingHeader . fromParams ( { project : request . project || '' , } ) ; this . initialize ( ) ; return this . innerApiCalls . listSubscriptions ( request , options , callback ) ; }
Lists matching subscriptions.
Lists matching subscriptions .