{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-ruby/issues/139","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-ruby/issues/139/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-ruby/issues/139/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-ruby/issues/139/events","html_url":"https://github.com/GoogleCloudPlatform/gcloud-ruby/pull/139","id":85125262,"number":139,"title":"Create top-level Gcloud object","user":{"login":"blowmage","id":730,"avatar_url":"https://avatars.githubusercontent.com/u/730?v=3","gravatar_id":"","url":"https://api.github.com/users/blowmage","html_url":"https://github.com/blowmage","followers_url":"https://api.github.com/users/blowmage/followers","following_url":"https://api.github.com/users/blowmage/following{/other_user}","gists_url":"https://api.github.com/users/blowmage/gists{/gist_id}","starred_url":"https://api.github.com/users/blowmage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blowmage/subscriptions","organizations_url":"https://api.github.com/users/blowmage/orgs","repos_url":"https://api.github.com/users/blowmage/repos","events_url":"https://api.github.com/users/blowmage/events{/privacy}","received_events_url":"https://api.github.com/users/blowmage/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-ruby/labels/cla:%20yes","name":"cla: yes","color":"009800"},{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-ruby/labels/in%20progress","name":"in progress","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-04T14:35:36Z","updated_at":"2015-06-04T14:43:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-ruby/pulls/139","html_url":"https://github.com/GoogleCloudPlatform/gcloud-ruby/pull/139","diff_url":"https://github.com/GoogleCloudPlatform/gcloud-ruby/pull/139.diff","patch_url":"https://github.com/GoogleCloudPlatform/gcloud-ruby/pull/139.patch"},"body":"Allows us to create a top level gcloud object instead of creating service objects on the modules/namespace. The top-level gcloud instance object creates service objects using the shared credentials.\r\n\r\nBefore:\r\n\r\n```ruby\r\nrequire \"gcloud/datastore\"\r\nrequire \"gcloud/storage\"\r\n\r\ndatastore = Gcloud.datastore\r\nentity = datastore.find \"Task\", 1234\r\n\r\nstorage = Gcloud.storage\r\nbucket = storage.bucket \"my-todos-bucket\"\r\n```\r\n\r\nAfter:\r\n\r\n```ruby\r\nrequire \"gcloud\"\r\n\r\ngcloud = Gcloud.new\r\n\r\ndatastore = gcloud.datastore\r\nentity = datastore.find \"Task\", 1234\r\n\r\nstorage = gcloud.storage\r\nbucket = storage.bucket \"my-todos-bucket\"\r\n```\r\nFor now the various namespaces and requires still exist. This change is additive and optional.\r\n\r\nThoughts?\r\n\r\n[refs #137]"},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-ruby/issues/comments/108920216","html_url":"https://github.com/GoogleCloudPlatform/gcloud-ruby/pull/139#issuecomment-108920216","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-ruby/issues/139","id":108920216,"user":{"login":"blowmage","id":730,"avatar_url":"https://avatars.githubusercontent.com/u/730?v=3","gravatar_id":"","url":"https://api.github.com/users/blowmage","html_url":"https://github.com/blowmage","followers_url":"https://api.github.com/users/blowmage/followers","following_url":"https://api.github.com/users/blowmage/following{/other_user}","gists_url":"https://api.github.com/users/blowmage/gists{/gist_id}","starred_url":"https://api.github.com/users/blowmage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blowmage/subscriptions","organizations_url":"https://api.github.com/users/blowmage/orgs","repos_url":"https://api.github.com/users/blowmage/repos","events_url":"https://api.github.com/users/blowmage/events{/privacy}","received_events_url":"https://api.github.com/users/blowmage/received_events","type":"User","site_admin":false},"created_at":"2015-06-04T14:43:02Z","updated_at":"2015-06-04T14:43:02Z","body":"You can still use the old syntax. The old vs. new is purely optional. Resources are loaded as needed. For example, if you never call `Gcloud.new.datastore` then you will never load the protobuf code."}}