{"action":"created","comment":{"url":"https://api.github.com/repos/bugsnag/bugsnag-vue/pulls/comments/186274768","pull_request_review_id":117827461,"id":186274768,"diff_hunk":"@@ -0,0 +1,63 @@\n+<template>\n+  <div class=\"hello\">\n+    <p>This example shows how to initialize the <code>bugsnagClient</code> once and import<br/>it invarious parts of your application to report your own errors to Bugsnag.</p>\n+\n+    <h3>Use case: notifying Bugsnag of a handled error</h3>\n+    <p>Example: we try to parse some user-provided JSON which we know might fail</p>\n+    <p><textarea v-model=\"json\"></textarea></p>\n+    <button v-on:click=\"parse\">Consume JSON</button>\n+\n+    <h3>Use case: notifying Bugsnag when a certain condition is met</h3>\n+    <p>Example: we want to know if a user ends up clicking this button more than 10 times.</p>\n+    <button v-on:click=\"click\">Click me</button>\n+    <p>Clicks: {{ clicks }}</p>\n+\n+  </div>\n+</template>\n+\n+<script>\n+import bugsnagClient from '../lib/bugsnag'\n+export default {\n+  name: 'HelloWorld',\n+  props: {\n+    msg: String\n+  },\n+  data: () => ({\n+    clicks: 0,\n+    json: '{ \"not quite: json\" }'\n+  }),\n+  methods: {\n+    parse: function () {\n+      try {\n+        JSON.parse(this.json)\n+      } catch (e) {\n+        bugsnagClient.notify(e)\n+      }\n+    },\n+    click: function () {\n+      this.clicks += 1\n+      if (this.clicks === 10) {\n+        bugsnagClient(new Error('user clicked button too many times!'), { severity: 'info' })","path":"examples/bundled/src/components/HelloWorld.vue","position":40,"original_position":40,"commit_id":"a61c36b54fd833e5ce37b09e1cc899fc7ac9e8f3","original_commit_id":"a61c36b54fd833e5ce37b09e1cc899fc7ac9e8f3","user":{"login":"tremlab","id":22690511,"avatar_url":"https://avatars0.githubusercontent.com/u/22690511?v=4","gravatar_id":"","url":"https://api.github.com/users/tremlab","html_url":"https://github.com/tremlab","followers_url":"https://api.github.com/users/tremlab/followers","following_url":"https://api.github.com/users/tremlab/following{/other_user}","gists_url":"https://api.github.com/users/tremlab/gists{/gist_id}","starred_url":"https://api.github.com/users/tremlab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tremlab/subscriptions","organizations_url":"https://api.github.com/users/tremlab/orgs","repos_url":"https://api.github.com/users/tremlab/repos","events_url":"https://api.github.com/users/tremlab/events{/privacy}","received_events_url":"https://api.github.com/users/tremlab/received_events","type":"User","site_admin":false},"body":"bugsnagClient.notify","created_at":"2018-05-05T23:30:34Z","updated_at":"2018-05-05T23:30:34Z","html_url":"https://github.com/bugsnag/bugsnag-vue/pull/7#discussion_r186274768","pull_request_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/pulls/7","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/bugsnag/bugsnag-vue/pulls/comments/186274768"},"html":{"href":"https://github.com/bugsnag/bugsnag-vue/pull/7#discussion_r186274768"},"pull_request":{"href":"https://api.github.com/repos/bugsnag/bugsnag-vue/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/bugsnag/bugsnag-vue/pulls/7","id":185484773,"html_url":"https://github.com/bugsnag/bugsnag-vue/pull/7","diff_url":"https://github.com/bugsnag/bugsnag-vue/pull/7.diff","patch_url":"https://github.com/bugsnag/bugsnag-vue/pull/7.patch","issue_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/issues/7","number":7,"state":"open","locked":false,"title":"Add bundled example project","user":{"login":"bengourley","id":609579,"avatar_url":"https://avatars1.githubusercontent.com/u/609579?v=4","gravatar_id":"","url":"https://api.github.com/users/bengourley","html_url":"https://github.com/bengourley","followers_url":"https://api.github.com/users/bengourley/followers","following_url":"https://api.github.com/users/bengourley/following{/other_user}","gists_url":"https://api.github.com/users/bengourley/gists{/gist_id}","starred_url":"https://api.github.com/users/bengourley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bengourley/subscriptions","organizations_url":"https://api.github.com/users/bengourley/orgs","repos_url":"https://api.github.com/users/bengourley/repos","events_url":"https://api.github.com/users/bengourley/events{/privacy}","received_events_url":"https://api.github.com/users/bengourley/received_events","type":"User","site_admin":false},"body":"<img width=\"935\" alt=\"image\" src=\"https://user-images.githubusercontent.com/609579/39534710-25e2f932-4e2a-11e8-8005-080eaa7fc7cd.png\">\r\n","created_at":"2018-05-02T15:58:24Z","updated_at":"2018-05-05T23:30:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3b2cdd7d84510e9cb2aed08025a62e5159b4d43b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/pulls/7/commits","review_comments_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/pulls/7/comments","review_comment_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/issues/7/comments","statuses_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/statuses/a61c36b54fd833e5ce37b09e1cc899fc7ac9e8f3","head":{"label":"bugsnag:bundled-example","ref":"bundled-example","sha":"a61c36b54fd833e5ce37b09e1cc899fc7ac9e8f3","user":{"login":"bugsnag","id":1058895,"avatar_url":"https://avatars2.githubusercontent.com/u/1058895?v=4","gravatar_id":"","url":"https://api.github.com/users/bugsnag","html_url":"https://github.com/bugsnag","followers_url":"https://api.github.com/users/bugsnag/followers","following_url":"https://api.github.com/users/bugsnag/following{/other_user}","gists_url":"https://api.github.com/users/bugsnag/gists{/gist_id}","starred_url":"https://api.github.com/users/bugsnag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bugsnag/subscriptions","organizations_url":"https://api.github.com/users/bugsnag/orgs","repos_url":"https://api.github.com/users/bugsnag/repos","events_url":"https://api.github.com/users/bugsnag/events{/privacy}","received_events_url":"https://api.github.com/users/bugsnag/received_events","type":"Organization","site_admin":false},"repo":{"id":111818943,"name":"bugsnag-vue","full_name":"bugsnag/bugsnag-vue","owner":{"login":"bugsnag","id":1058895,"avatar_url":"https://avatars2.githubusercontent.com/u/1058895?v=4","gravatar_id":"","url":"https://api.github.com/users/bugsnag","html_url":"https://github.com/bugsnag","followers_url":"https://api.github.com/users/bugsnag/followers","following_url":"https://api.github.com/users/bugsnag/following{/other_user}","gists_url":"https://api.github.com/users/bugsnag/gists{/gist_id}","starred_url":"https://api.github.com/users/bugsnag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bugsnag/subscriptions","organizations_url":"https://api.github.com/users/bugsnag/orgs","repos_url":"https://api.github.com/users/bugsnag/repos","events_url":"https://api.github.com/users/bugsnag/events{/privacy}","received_events_url":"https://api.github.com/users/bugsnag/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bugsnag/bugsnag-vue","description":"Vue.js integration for bugsnag-js","fork":false,"url":"https://api.github.com/repos/bugsnag/bugsnag-vue","forks_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/forks","keys_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/teams","hooks_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/hooks","issue_events_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/issues/events{/number}","events_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/events","assignees_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/assignees{/user}","branches_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/branches{/branch}","tags_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/tags","blobs_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/git/refs{/sha}","trees_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/statuses/{sha}","languages_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/languages","stargazers_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/stargazers","contributors_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/contributors","subscribers_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/subscribers","subscription_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/subscription","commits_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/commits{/sha}","git_commits_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/git/commits{/sha}","comments_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/comments{/number}","issue_comment_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/issues/comments{/number}","contents_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/contents/{+path}","compare_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/merges","archive_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/downloads","issues_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/issues{/number}","pulls_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/pulls{/number}","milestones_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/milestones{/number}","notifications_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/labels{/name}","releases_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/releases{/id}","deployments_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/deployments","created_at":"2017-11-23T14:28:16Z","updated_at":"2018-03-22T11:49:10Z","pushed_at":"2018-05-02T15:58:25Z","git_url":"git://github.com/bugsnag/bugsnag-vue.git","ssh_url":"git@github.com:bugsnag/bugsnag-vue.git","clone_url":"https://github.com/bugsnag/bugsnag-vue.git","svn_url":"https://github.com/bugsnag/bugsnag-vue","homepage":null,"size":195,"stargazers_count":11,"watchers_count":11,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1,"open_issues":1,"watchers":11,"default_branch":"master"}},"base":{"label":"bugsnag:master","ref":"master","sha":"6a12e83f263d2ff864589d6bfcf19993c5f7d589","user":{"login":"bugsnag","id":1058895,"avatar_url":"https://avatars2.githubusercontent.com/u/1058895?v=4","gravatar_id":"","url":"https://api.github.com/users/bugsnag","html_url":"https://github.com/bugsnag","followers_url":"https://api.github.com/users/bugsnag/followers","following_url":"https://api.github.com/users/bugsnag/following{/other_user}","gists_url":"https://api.github.com/users/bugsnag/gists{/gist_id}","starred_url":"https://api.github.com/users/bugsnag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bugsnag/subscriptions","organizations_url":"https://api.github.com/users/bugsnag/orgs","repos_url":"https://api.github.com/users/bugsnag/repos","events_url":"https://api.github.com/users/bugsnag/events{/privacy}","received_events_url":"https://api.github.com/users/bugsnag/received_events","type":"Organization","site_admin":false},"repo":{"id":111818943,"name":"bugsnag-vue","full_name":"bugsnag/bugsnag-vue","owner":{"login":"bugsnag","id":1058895,"avatar_url":"https://avatars2.githubusercontent.com/u/1058895?v=4","gravatar_id":"","url":"https://api.github.com/users/bugsnag","html_url":"https://github.com/bugsnag","followers_url":"https://api.github.com/users/bugsnag/followers","following_url":"https://api.github.com/users/bugsnag/following{/other_user}","gists_url":"https://api.github.com/users/bugsnag/gists{/gist_id}","starred_url":"https://api.github.com/users/bugsnag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bugsnag/subscriptions","organizations_url":"https://api.github.com/users/bugsnag/orgs","repos_url":"https://api.github.com/users/bugsnag/repos","events_url":"https://api.github.com/users/bugsnag/events{/privacy}","received_events_url":"https://api.github.com/users/bugsnag/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bugsnag/bugsnag-vue","description":"Vue.js integration for bugsnag-js","fork":false,"url":"https://api.github.com/repos/bugsnag/bugsnag-vue","forks_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/forks","keys_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/teams","hooks_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/hooks","issue_events_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/issues/events{/number}","events_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/events","assignees_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/assignees{/user}","branches_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/branches{/branch}","tags_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/tags","blobs_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/git/refs{/sha}","trees_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/statuses/{sha}","languages_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/languages","stargazers_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/stargazers","contributors_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/contributors","subscribers_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/subscribers","subscription_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/subscription","commits_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/commits{/sha}","git_commits_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/git/commits{/sha}","comments_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/comments{/number}","issue_comment_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/issues/comments{/number}","contents_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/contents/{+path}","compare_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/merges","archive_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/downloads","issues_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/issues{/number}","pulls_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/pulls{/number}","milestones_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/milestones{/number}","notifications_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/labels{/name}","releases_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/releases{/id}","deployments_url":"https://api.github.com/repos/bugsnag/bugsnag-vue/deployments","created_at":"2017-11-23T14:28:16Z","updated_at":"2018-03-22T11:49:10Z","pushed_at":"2018-05-02T15:58:25Z","git_url":"git://github.com/bugsnag/bugsnag-vue.git","ssh_url":"git@github.com:bugsnag/bugsnag-vue.git","clone_url":"https://github.com/bugsnag/bugsnag-vue.git","svn_url":"https://github.com/bugsnag/bugsnag-vue","homepage":null,"size":195,"stargazers_count":11,"watchers_count":11,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1,"open_issues":1,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bugsnag/bugsnag-vue/pulls/7"},"html":{"href":"https://github.com/bugsnag/bugsnag-vue/pull/7"},"issue":{"href":"https://api.github.com/repos/bugsnag/bugsnag-vue/issues/7"},"comments":{"href":"https://api.github.com/repos/bugsnag/bugsnag-vue/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/bugsnag/bugsnag-vue/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/bugsnag/bugsnag-vue/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bugsnag/bugsnag-vue/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/bugsnag/bugsnag-vue/statuses/a61c36b54fd833e5ce37b09e1cc899fc7ac9e8f3"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"tremlab"}}