1616
1717'use strict' ;
1818
19- var events = require ( 'events' ) ,
20- nodeutil = require ( 'util' ) ;
19+ var events = require ( 'events' ) ;
20+ var nodeutil = require ( 'util' ) ;
2121
22- var conn = require ( '../common/connection.js' ) ,
23- util = require ( '../common/util.js' ) ;
22+ var conn = require ( '../common/connection.js' ) ;
23+ var util = require ( '../common/util.js' ) ;
2424
2525/**
2626 * Base URL for Pub/Sub API.
2727 * @type {String }
2828 */
2929var PUBSUB_BASE_URL = 'https://www.googleapis.com/pubsub/v1beta1' ;
30+
3031/**
3132 * Required scopes for Pub/Sub API.
3233 * @type {Array }
@@ -77,8 +78,8 @@ Subscription.prototype.pull = function(opts, callback) {
7778 subscription : this . name ,
7879 returnImmediately : ! ! opts . returnImmediately
7980 } ;
80- this . conn . makeReq ( 'POST' , 'subscriptions/pull' , null , body ,
81- function ( err , message ) {
81+ this . conn . makeReq (
82+ 'POST' , 'subscriptions/pull' , null , body , function ( err , message ) {
8283 // TODO(jbd): Fix API to return a list of messages.
8384 if ( err ) {
8485 callback ( err ) ;
@@ -247,11 +248,12 @@ Connection.prototype.listSubscriptions = function(query, callback) {
247248 }
248249 var q = util . extend ( { } , query ) ;
249250 if ( q . filterByTopic ) {
250- q . query = 'pubsub.googleapis.com/topic in (' +
251- this . fullTopicName_ ( q . filterByTopic ) + ')' ;
251+ q . query =
252+ 'pubsub.googleapis.com/topic in (' +
253+ this . fullTopicName_ ( q . filterByTopic ) + ')' ;
252254 } else {
253- q . query = 'cloud.googleapis.com/project in (' + this . fullProjectName_ ( ) +
254- ')' ;
255+ q . query =
256+ 'cloud.googleapis.com/project in (' + this . fullProjectName_ ( ) + ')' ;
255257 }
256258 delete q . filterByTopic ;
257259
@@ -365,8 +367,8 @@ Connection.prototype.listTopics = function(query, callback) {
365367 */
366368Connection . prototype . getTopic = function ( name , callback ) {
367369 var that = this ;
368- var cb = callback || util . noop ,
369- fullName = this . fullTopicName_ ( name ) ;
370+ var cb = callback || util . noop ;
371+ var fullName = this . fullTopicName_ ( name ) ;
370372 this . makeReq ( 'GET' , 'topics/' + fullName , null , true , function ( err ) {
371373 if ( err ) {
372374 return cb ( err ) ;
@@ -382,8 +384,8 @@ Connection.prototype.getTopic = function(name, callback) {
382384 */
383385Connection . prototype . createTopic = function ( name , callback ) {
384386 var that = this ;
385- var cb = callback || util . noop ,
386- fullName = this . fullTopicName_ ( name ) ;
387+ var cb = callback || util . noop ;
388+ var fullName = this . fullTopicName_ ( name ) ;
387389 this . makeReq ( 'POST' , 'topics' , null , { name : fullName } , function ( err ) {
388390 cb ( err , new Topic ( that , fullName ) ) ;
389391 } ) ;
0 commit comments