{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/pulls/comments/149836930","pull_request_review_id":75296325,"id":149836930,"diff_hunk":"@@ -4,6 +4,31 @@ defmodule GoogleApi.PubSub.Samples do\n   \"\"\"\n \n   @doc \"\"\"\n+  Get a PubSub topic.\n+\n+  ## Examples\n+\n+      iex> GoogleApi.PubSub.Samples.get_topic(\"YOUR_PROJECT_ID\", \"test-topic\")\n+\n+  \"\"\"\n+  def get_topic(project_id, topic_name) do\n+    # Authenticate\n+    {:ok, token} = Goth.Token.for_scope(\"https://www.googleapis.com/auth/cloud-platform\")\n+    conn = GoogleApi.PubSub.V1.Connection.new(token.token)\n+\n+    # Make the API request.\n+    GoogleApi.PubSub.V1.Api.Projects.pubsub_projects_topics_get(\n+      conn,\n+      project_id,\n+      topic_name\n+    )\n+    |> case do","path":"pubsub/lib/pubsub_samples.ex","position":22,"original_position":22,"commit_id":"ebc60d8bf3b17bce60e002be1f11a3166400ba27","original_commit_id":"ebc60d8bf3b17bce60e002be1f11a3166400ba27","user":{"login":"dazuma","id":8911,"avatar_url":"https://avatars2.githubusercontent.com/u/8911?v=4","gravatar_id":"","url":"https://api.github.com/users/dazuma","html_url":"https://github.com/dazuma","followers_url":"https://api.github.com/users/dazuma/followers","following_url":"https://api.github.com/users/dazuma/following{/other_user}","gists_url":"https://api.github.com/users/dazuma/gists{/gist_id}","starred_url":"https://api.github.com/users/dazuma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dazuma/subscriptions","organizations_url":"https://api.github.com/users/dazuma/orgs","repos_url":"https://api.github.com/users/dazuma/repos","events_url":"https://api.github.com/users/dazuma/events{/privacy}","received_events_url":"https://api.github.com/users/dazuma/received_events","type":"User","site_admin":false},"body":"I think it was better before. It's generally considered bad form to start a pipeline with a function call rather than a simple value.","created_at":"2017-11-09T00:22:55Z","updated_at":"2017-11-09T00:22:55Z","html_url":"https://github.com/GoogleCloudPlatform/elixir-samples/pull/5#discussion_r149836930","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/pulls/5","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/pulls/comments/149836930"},"html":{"href":"https://github.com/GoogleCloudPlatform/elixir-samples/pull/5#discussion_r149836930"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/pulls/5"}},"in_reply_to_id":149836634},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/pulls/5","id":146580176,"html_url":"https://github.com/GoogleCloudPlatform/elixir-samples/pull/5","diff_url":"https://github.com/GoogleCloudPlatform/elixir-samples/pull/5.diff","patch_url":"https://github.com/GoogleCloudPlatform/elixir-samples/pull/5.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/issues/5","number":5,"state":"open","locked":false,"title":"Adds topic publish and subscription pull","user":{"login":"bshaffer","id":103941,"avatar_url":"https://avatars3.githubusercontent.com/u/103941?v=4","gravatar_id":"","url":"https://api.github.com/users/bshaffer","html_url":"https://github.com/bshaffer","followers_url":"https://api.github.com/users/bshaffer/followers","following_url":"https://api.github.com/users/bshaffer/following{/other_user}","gists_url":"https://api.github.com/users/bshaffer/gists{/gist_id}","starred_url":"https://api.github.com/users/bshaffer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bshaffer/subscriptions","organizations_url":"https://api.github.com/users/bshaffer/orgs","repos_url":"https://api.github.com/users/bshaffer/repos","events_url":"https://api.github.com/users/bshaffer/events{/privacy}","received_events_url":"https://api.github.com/users/bshaffer/received_events","type":"User","site_admin":false},"body":"RFC for creating functions to publish to a topic and then spawn a process to pull the subscription","created_at":"2017-10-14T01:17:55Z","updated_at":"2017-11-09T00:22:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"83608899c4fcfd73130f3a70f2e57b90209a3813","assignee":null,"assignees":[],"requested_reviewers":[{"login":"chingor13","id":32483,"avatar_url":"https://avatars0.githubusercontent.com/u/32483?v=4","gravatar_id":"","url":"https://api.github.com/users/chingor13","html_url":"https://github.com/chingor13","followers_url":"https://api.github.com/users/chingor13/followers","following_url":"https://api.github.com/users/chingor13/following{/other_user}","gists_url":"https://api.github.com/users/chingor13/gists{/gist_id}","starred_url":"https://api.github.com/users/chingor13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chingor13/subscriptions","organizations_url":"https://api.github.com/users/chingor13/orgs","repos_url":"https://api.github.com/users/chingor13/repos","events_url":"https://api.github.com/users/chingor13/events{/privacy}","received_events_url":"https://api.github.com/users/chingor13/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/pulls/5/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/pulls/5/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/issues/5/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/statuses/ebc60d8bf3b17bce60e002be1f11a3166400ba27","head":{"label":"GoogleCloudPlatform:pubsub","ref":"pubsub","sha":"ebc60d8bf3b17bce60e002be1f11a3166400ba27","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars0.githubusercontent.com/u/2810941?v=4","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":101318881,"name":"elixir-samples","full_name":"GoogleCloudPlatform/elixir-samples","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars0.githubusercontent.com/u/2810941?v=4","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/elixir-samples","description":"A collection of samples on using Elixir with Google Cloud Platform. ","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/deployments","created_at":"2017-08-24T17:04:45Z","updated_at":"2017-11-07T05:56:56Z","pushed_at":"2017-11-09T00:20:19Z","git_url":"git://github.com/GoogleCloudPlatform/elixir-samples.git","ssh_url":"git@github.com:GoogleCloudPlatform/elixir-samples.git","clone_url":"https://github.com/GoogleCloudPlatform/elixir-samples.git","svn_url":"https://github.com/GoogleCloudPlatform/elixir-samples","homepage":"https://cloud.google.com/community","size":94,"stargazers_count":6,"watchers_count":6,"language":"Elixir","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":6,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:master","ref":"master","sha":"07dbffb317ebb53e9ffaab5c7eb8f4d8eddb3359","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars0.githubusercontent.com/u/2810941?v=4","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":101318881,"name":"elixir-samples","full_name":"GoogleCloudPlatform/elixir-samples","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars0.githubusercontent.com/u/2810941?v=4","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/elixir-samples","description":"A collection of samples on using Elixir with Google Cloud Platform. ","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/deployments","created_at":"2017-08-24T17:04:45Z","updated_at":"2017-11-07T05:56:56Z","pushed_at":"2017-11-09T00:20:19Z","git_url":"git://github.com/GoogleCloudPlatform/elixir-samples.git","ssh_url":"git@github.com:GoogleCloudPlatform/elixir-samples.git","clone_url":"https://github.com/GoogleCloudPlatform/elixir-samples.git","svn_url":"https://github.com/GoogleCloudPlatform/elixir-samples","homepage":"https://cloud.google.com/community","size":94,"stargazers_count":6,"watchers_count":6,"language":"Elixir","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/pulls/5"},"html":{"href":"https://github.com/GoogleCloudPlatform/elixir-samples/pull/5"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/issues/5"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/elixir-samples/statuses/ebc60d8bf3b17bce60e002be1f11a3166400ba27"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"dazuma"}}