{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/comments/53380721","id":53380721,"diff_hunk":"@@ -0,0 +1,295 @@\n+Using the API\n+=============\n+\n+Authentication / Configuration\n+------------------------------\n+\n+- Use :class:`Client <gcloud.logging.client.Client>` objects to configure\n+  your applications.\n+\n+- :class:`Client <gcloud.logging.client.Client>` objects hold both a ``project``\n+  and an authenticated connection to the Logging service.\n+\n+- The authentication credentials can be implicitly determined from the\n+  environment or directly via\n+  :meth:`from_service_account_json <gcloud.logging.client.Client.from_service_account_json>`\n+  and\n+  :meth:`from_service_account_p12 <gcloud.logging.client.Client.from_service_account_p12>`.\n+\n+- After setting ``GOOGLE_APPLICATION_CREDENTIALS`` and ``GCLOUD_PROJECT``\n+  environment variables, create a :class:`Client <gcloud.logging.client.Client>`\n+\n+  .. doctest::\n+\n+     >>> from gcloud import logging\n+     >>> client = logging.Client()\n+\n+Writing log entries","path":"docs/logging-usage.rst","position":27,"original_position":27,"commit_id":"2e8b2dac95857a97d8ad0181ef493e272569c202","original_commit_id":"2e8b2dac95857a97d8ad0181ef493e272569c202","user":{"login":"dhermes","id":520669,"avatar_url":"https://avatars.githubusercontent.com/u/520669?v=3","gravatar_id":"","url":"https://api.github.com/users/dhermes","html_url":"https://github.com/dhermes","followers_url":"https://api.github.com/users/dhermes/followers","following_url":"https://api.github.com/users/dhermes/following{/other_user}","gists_url":"https://api.github.com/users/dhermes/gists{/gist_id}","starred_url":"https://api.github.com/users/dhermes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhermes/subscriptions","organizations_url":"https://api.github.com/users/dhermes/orgs","repos_url":"https://api.github.com/users/dhermes/repos","events_url":"https://api.github.com/users/dhermes/events{/privacy}","received_events_url":"https://api.github.com/users/dhermes/received_events","type":"User","site_admin":false},"body":"Safe to assume both methods below use [`logging.entries.write`][1]?\r\n\r\n[1]: https://developers.google.com/apis-explorer/#p/logging/v2beta1/logging.entries.write","created_at":"2016-02-18T20:54:43Z","updated_at":"2016-02-18T20:54:43Z","html_url":"https://github.com/GoogleCloudPlatform/gcloud-python/pull/1488#discussion_r53380721","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/1488","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/comments/53380721"},"html":{"href":"https://github.com/GoogleCloudPlatform/gcloud-python/pull/1488#discussion_r53380721"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/1488"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/1488","id":59836601,"html_url":"https://github.com/GoogleCloudPlatform/gcloud-python/pull/1488","diff_url":"https://github.com/GoogleCloudPlatform/gcloud-python/pull/1488.diff","patch_url":"https://github.com/GoogleCloudPlatform/gcloud-python/pull/1488.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/1488","number":1488,"state":"open","locked":false,"title":"Initial sketch of logging API usage docs.","user":{"login":"tseaver","id":242750,"avatar_url":"https://avatars.githubusercontent.com/u/242750?v=3","gravatar_id":"","url":"https://api.github.com/users/tseaver","html_url":"https://github.com/tseaver","followers_url":"https://api.github.com/users/tseaver/followers","following_url":"https://api.github.com/users/tseaver/following{/other_user}","gists_url":"https://api.github.com/users/tseaver/gists{/gist_id}","starred_url":"https://api.github.com/users/tseaver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tseaver/subscriptions","organizations_url":"https://api.github.com/users/tseaver/orgs","repos_url":"https://api.github.com/users/tseaver/repos","events_url":"https://api.github.com/users/tseaver/events{/privacy}","received_events_url":"https://api.github.com/users/tseaver/received_events","type":"User","site_admin":false},"body":"@jgeewax @dhermes please review the usage patterns here.  Note that I've left out the API methods for listing `monitoredResourceDescriptors`:  I couldn't quite figure why they are part of this API, rather than a more generic one (such as `resource_manager`).\r\n\r\nI don't intend to merge this PR directly, but will incorporate the updated usage doc in the initial PR for logging.  BTW, should we adopt the pattern of targeting such PRs at a long-lived `logging-api` branch, rather than master?  We would then land the whole API at once by merging that branch.","created_at":"2016-02-18T17:47:48Z","updated_at":"2016-02-18T20:54:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"21a4a3034d8ae6613ffc1fa7fe69961b9bb2b64d","assignee":{"login":"dhermes","id":520669,"avatar_url":"https://avatars.githubusercontent.com/u/520669?v=3","gravatar_id":"","url":"https://api.github.com/users/dhermes","html_url":"https://github.com/dhermes","followers_url":"https://api.github.com/users/dhermes/followers","following_url":"https://api.github.com/users/dhermes/following{/other_user}","gists_url":"https://api.github.com/users/dhermes/gists{/gist_id}","starred_url":"https://api.github.com/users/dhermes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhermes/subscriptions","organizations_url":"https://api.github.com/users/dhermes/orgs","repos_url":"https://api.github.com/users/dhermes/repos","events_url":"https://api.github.com/users/dhermes/events{/privacy}","received_events_url":"https://api.github.com/users/dhermes/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/1488/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/1488/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/1488/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/statuses/2e8b2dac95857a97d8ad0181ef493e272569c202","head":{"label":"tseaver:logging-usage_sketch","ref":"logging-usage_sketch","sha":"2e8b2dac95857a97d8ad0181ef493e272569c202","user":{"login":"tseaver","id":242750,"avatar_url":"https://avatars.githubusercontent.com/u/242750?v=3","gravatar_id":"","url":"https://api.github.com/users/tseaver","html_url":"https://github.com/tseaver","followers_url":"https://api.github.com/users/tseaver/followers","following_url":"https://api.github.com/users/tseaver/following{/other_user}","gists_url":"https://api.github.com/users/tseaver/gists{/gist_id}","starred_url":"https://api.github.com/users/tseaver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tseaver/subscriptions","organizations_url":"https://api.github.com/users/tseaver/orgs","repos_url":"https://api.github.com/users/tseaver/repos","events_url":"https://api.github.com/users/tseaver/events{/privacy}","received_events_url":"https://api.github.com/users/tseaver/received_events","type":"User","site_admin":false},"repo":{"id":23322104,"name":"gcloud-python","full_name":"tseaver/gcloud-python","owner":{"login":"tseaver","id":242750,"avatar_url":"https://avatars.githubusercontent.com/u/242750?v=3","gravatar_id":"","url":"https://api.github.com/users/tseaver","html_url":"https://github.com/tseaver","followers_url":"https://api.github.com/users/tseaver/followers","following_url":"https://api.github.com/users/tseaver/following{/other_user}","gists_url":"https://api.github.com/users/tseaver/gists{/gist_id}","starred_url":"https://api.github.com/users/tseaver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tseaver/subscriptions","organizations_url":"https://api.github.com/users/tseaver/orgs","repos_url":"https://api.github.com/users/tseaver/repos","events_url":"https://api.github.com/users/tseaver/events{/privacy}","received_events_url":"https://api.github.com/users/tseaver/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tseaver/gcloud-python","description":"Google Cloud Python Client Library","fork":true,"url":"https://api.github.com/repos/tseaver/gcloud-python","forks_url":"https://api.github.com/repos/tseaver/gcloud-python/forks","keys_url":"https://api.github.com/repos/tseaver/gcloud-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tseaver/gcloud-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tseaver/gcloud-python/teams","hooks_url":"https://api.github.com/repos/tseaver/gcloud-python/hooks","issue_events_url":"https://api.github.com/repos/tseaver/gcloud-python/issues/events{/number}","events_url":"https://api.github.com/repos/tseaver/gcloud-python/events","assignees_url":"https://api.github.com/repos/tseaver/gcloud-python/assignees{/user}","branches_url":"https://api.github.com/repos/tseaver/gcloud-python/branches{/branch}","tags_url":"https://api.github.com/repos/tseaver/gcloud-python/tags","blobs_url":"https://api.github.com/repos/tseaver/gcloud-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tseaver/gcloud-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tseaver/gcloud-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/tseaver/gcloud-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tseaver/gcloud-python/statuses/{sha}","languages_url":"https://api.github.com/repos/tseaver/gcloud-python/languages","stargazers_url":"https://api.github.com/repos/tseaver/gcloud-python/stargazers","contributors_url":"https://api.github.com/repos/tseaver/gcloud-python/contributors","subscribers_url":"https://api.github.com/repos/tseaver/gcloud-python/subscribers","subscription_url":"https://api.github.com/repos/tseaver/gcloud-python/subscription","commits_url":"https://api.github.com/repos/tseaver/gcloud-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/tseaver/gcloud-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/tseaver/gcloud-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/tseaver/gcloud-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/tseaver/gcloud-python/contents/{+path}","compare_url":"https://api.github.com/repos/tseaver/gcloud-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tseaver/gcloud-python/merges","archive_url":"https://api.github.com/repos/tseaver/gcloud-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tseaver/gcloud-python/downloads","issues_url":"https://api.github.com/repos/tseaver/gcloud-python/issues{/number}","pulls_url":"https://api.github.com/repos/tseaver/gcloud-python/pulls{/number}","milestones_url":"https://api.github.com/repos/tseaver/gcloud-python/milestones{/number}","notifications_url":"https://api.github.com/repos/tseaver/gcloud-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tseaver/gcloud-python/labels{/name}","releases_url":"https://api.github.com/repos/tseaver/gcloud-python/releases{/id}","deployments_url":"https://api.github.com/repos/tseaver/gcloud-python/deployments","created_at":"2014-08-25T17:19:33Z","updated_at":"2016-02-15T20:27:04Z","pushed_at":"2016-02-18T19:31:53Z","git_url":"git://github.com/tseaver/gcloud-python.git","ssh_url":"git@github.com:tseaver/gcloud-python.git","clone_url":"https://github.com/tseaver/gcloud-python.git","svn_url":"https://github.com/tseaver/gcloud-python","homepage":"http://googlecloudplatform.github.io/gcloud-python/","size":9370,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:master","ref":"master","sha":"6712b79a74eb528e7fb652ac8604a4e6dbed14f8","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":16316451,"name":"gcloud-python","full_name":"GoogleCloudPlatform/gcloud-python","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/gcloud-python","description":"Google Cloud Client Library for Python","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/deployments","created_at":"2014-01-28T15:51:47Z","updated_at":"2016-02-16T05:57:48Z","pushed_at":"2016-02-18T20:49:44Z","git_url":"git://github.com/GoogleCloudPlatform/gcloud-python.git","ssh_url":"git@github.com:GoogleCloudPlatform/gcloud-python.git","clone_url":"https://github.com/GoogleCloudPlatform/gcloud-python.git","svn_url":"https://github.com/GoogleCloudPlatform/gcloud-python","homepage":"https://googlecloudplatform.github.io/gcloud-python/","size":44365,"stargazers_count":239,"watchers_count":239,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":140,"mirror_url":null,"open_issues_count":104,"forks":140,"open_issues":104,"watchers":239,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/1488"},"html":{"href":"https://github.com/GoogleCloudPlatform/gcloud-python/pull/1488"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/1488"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/1488/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/1488/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/1488/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/statuses/2e8b2dac95857a97d8ad0181ef493e272569c202"}}}}