diff --git a/docs/site/components/docs/dns-overview.html b/docs/site/components/docs/dns-overview.html new file mode 100644 index 00000000000..12862cb2f17 --- /dev/null +++ b/docs/site/components/docs/dns-overview.html @@ -0,0 +1,7 @@ +
+ The object returned from gcloud.dns
gives you complete control over your managed zones.
+
+ To learn more about Google Cloud DNS, see What is Google Cloud DNS? +
diff --git a/docs/site/components/docs/docs.html b/docs/site/components/docs/docs.html index e271a5bb5d9..dfb6adc6629 100644 --- a/docs/site/components/docs/docs.html +++ b/docs/site/components/docs/docs.html @@ -44,7 +44,7 @@- Google Cloud Pub/Sub is in Alpha status. As a result, it might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy. + This is a Beta release of Google Cloud Pub/Sub. This feature is not covered by any SLA or deprecation policy and may be subject to backward-incompatible changes.
The gcloud.pubsub
method will return a pubsub
object, allowing you to create topics, publish messages, subscribe to topics, and more.
diff --git a/docs/site/components/docs/search-overview.html b/docs/site/components/docs/search-overview.html
index a1b30c332df..cd5ff80b29e 100644
--- a/docs/site/components/docs/search-overview.html
+++ b/docs/site/components/docs/search-overview.html
@@ -1,4 +1,7 @@
+ This is an Alpha release of Google Cloud Search. This feature is not covered by any SLA or deprecation policy and may be subject to backward-incompatible changes. +
The object returned from gcloud.search
gives you complete access to store your documents and search your indexes.
+ * **This is a Beta release of Google Cloud Pub/Sub.** This feature is not + * covered by any SLA or deprecation policy and may be subject to backward- + * incompatible changes. + *
* * @type {module:pubsub} * @@ -206,25 +224,23 @@ gcloud.dns = DNS; * @example * var gcloud = require('gcloud'); * var pubsub = gcloud.pubsub({ - * projectId: 'project-id', + * projectId: 'grape-spaceship-123', * keyFilename: '/path/to/keyfile.json' * }); */ -gcloud.pubsub = function(config) { - return new PubSub(config); -}; +gcloud.pubsub = PubSub; /** - * **Experimental** - * * [Google Cloud Search](https://cloud.google.com/search/) allows you to quickly * perform full-text and geospatial searches against your data without having to * spin up your own instances and without the hassle of managing and maintaining * a search service. * - * Note: This is an *Alpha* release of Google Cloud Search. This feature is not - * covered by any SLA or deprecation policy and may be subject to backward- - * incompatible changes. + *+ * **This is an *Alpha* release of Google Cloud Search.** This feature is + * not covered by any SLA or deprecation policy and may be subject to + * backward-incompatible changes. + *
* * @type {module:search} * @@ -233,13 +249,11 @@ gcloud.pubsub = function(config) { * @example * var gcloud = require('gcloud'); * var search = gcloud.search({ - * projectId: 'project-id', + * projectId: 'grape-spaceship-123', * keyFilename: '/path/to/keyfile.json' * }); */ -gcloud.search = function(config) { - return new Search(config); -}; +gcloud.search = Search; /** * Google Cloud Storage allows you to store data on Google infrastructure. @@ -253,7 +267,7 @@ gcloud.search = function(config) { * @example * var gcloud = require('gcloud'); * var gcs = gcloud.storage({ - * projectId: 'project-id', + * projectId: 'grape-spaceship-123', * keyFilename: '/path/to/keyfile.json' * }); */ diff --git a/lib/pubsub/index.js b/lib/pubsub/index.js index 6810e288432..866d852e1b5 100644 --- a/lib/pubsub/index.js +++ b/lib/pubsub/index.js @@ -87,6 +87,10 @@ var SCOPES = [ * var pubsub = gcloud.pubsub(); */ function PubSub(options) { + if (!(this instanceof PubSub)) { + return new PubSub(options); + } + options = options || {}; if (!options.projectId) { diff --git a/lib/search/index.js b/lib/search/index.js index 8c9e5c02773..a8e11394237 100644 --- a/lib/search/index.js +++ b/lib/search/index.js @@ -80,7 +80,13 @@ var SEARCH_BASE_URL = 'https://cloudsearch.googleapis.com/v1/'; * var search = gcloud.search(); */ function Search(options) { - if (!options || !options.projectId) { + if (!(this instanceof Search)) { + return new Search(options); + } + + options = options || {}; + + if (!options.projectId) { throw util.missingProjectIdError; }