{"action":"created","comment":{"url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/pulls/comments/27555005","id":27555005,"diff_hunk":"@@ -0,0 +1,539 @@\n+;(function (context) {\n+\n+    /*\n+     * Injection of third-party modules\n+     * Wrapping up imports under `utils` to keep them in this project. JSON2 is\n+     * an exception but will only augment globally if it is missing.\n+     * Global polyfills: JSON2, Object.keys, Array.forEach\n+     * Helper libraries: cookieStorage, localStorage\n+     * Bower libraries: Fingerprint, History\n+     */\n+    var utils = {};\n+    (function () {\n+        /* inject */\n+        /* endinject */\n+    }).call(utils);\n+\n+    // Don't hard code anything\n+    var queryParamName = 'DA';\n+    var scriptTagId = 'advocate-things-script';\n+    var storageName = 'advocate-things';\n+\n+    var events = {\n+        TouchpointSaved: 'TouchpointSaved',\n+        SharepointSaved: 'SharepointSaved',\n+        ReferredPerson: 'ReferredPerson'\n+    };\n+\n+    var points = {\n+        Sharepoint: {\n+            name: 'Sharepoint',\n+            // url: 'http://127.0.0.1:3000'\n+            url: 'http://localhost:3001/campaign/token/sharepoint/data'","path":"lib/sdk.js","position":32,"original_position":32,"commit_id":"248aa915999d6b35ab930c0c7c83558882389375","original_commit_id":"248aa915999d6b35ab930c0c7c83558882389375","user":{"login":"jabclab","id":225286,"avatar_url":"https://avatars.githubusercontent.com/u/225286?v=3","gravatar_id":"","url":"https://api.github.com/users/jabclab","html_url":"https://github.com/jabclab","followers_url":"https://api.github.com/users/jabclab/followers","following_url":"https://api.github.com/users/jabclab/following{/other_user}","gists_url":"https://api.github.com/users/jabclab/gists{/gist_id}","starred_url":"https://api.github.com/users/jabclab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jabclab/subscriptions","organizations_url":"https://api.github.com/users/jabclab/orgs","repos_url":"https://api.github.com/users/jabclab/repos","events_url":"https://api.github.com/users/jabclab/events{/privacy}","received_events_url":"https://api.github.com/users/jabclab/received_events","type":"User","site_admin":false},"body":"Likely don't want these pointing to `localhost`?","created_at":"2015-04-01T09:27:38Z","updated_at":"2015-04-01T09:27:38Z","html_url":"https://github.com/digitalanimal/advocate-things-js-sdk/pull/1#discussion_r27555005","pull_request_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/pulls/comments/27555005"},"html":{"href":"https://github.com/digitalanimal/advocate-things-js-sdk/pull/1#discussion_r27555005"},"pull_request":{"href":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/pulls/1","id":32401289,"html_url":"https://github.com/digitalanimal/advocate-things-js-sdk/pull/1","diff_url":"https://github.com/digitalanimal/advocate-things-js-sdk/pull/1.diff","patch_url":"https://github.com/digitalanimal/advocate-things-js-sdk/pull/1.patch","issue_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/issues/1","number":1,"state":"open","locked":false,"title":"Initial SDK functionality implemented","user":{"login":"nbrl","id":7620088,"avatar_url":"https://avatars.githubusercontent.com/u/7620088?v=3","gravatar_id":"","url":"https://api.github.com/users/nbrl","html_url":"https://github.com/nbrl","followers_url":"https://api.github.com/users/nbrl/followers","following_url":"https://api.github.com/users/nbrl/following{/other_user}","gists_url":"https://api.github.com/users/nbrl/gists{/gist_id}","starred_url":"https://api.github.com/users/nbrl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nbrl/subscriptions","organizations_url":"https://api.github.com/users/nbrl/orgs","repos_url":"https://api.github.com/users/nbrl/repos","events_url":"https://api.github.com/users/nbrl/events{/privacy}","received_events_url":"https://api.github.com/users/nbrl/received_events","type":"User","site_admin":false},"body":"Currently:\r\n* Allows automatic sending of touchpoint/sharepoint\r\n* Manual sending of touchpoint/sharepoint with callbacks\r\n* Registration of event listeners\r\n* Calling of registered event listeners when an action occurs\r\n* Storage of AT data in cookies/local storage\r\n\r\n\r\n* Still spits out quite a lot of debugging data to the console. Leaving in for now.","created_at":"2015-04-01T09:15:30Z","updated_at":"2015-04-01T09:27:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4ec2549a7b1d55b2f15e5b951148c5cd3e13f623","assignee":{"login":"jabclab","id":225286,"avatar_url":"https://avatars.githubusercontent.com/u/225286?v=3","gravatar_id":"","url":"https://api.github.com/users/jabclab","html_url":"https://github.com/jabclab","followers_url":"https://api.github.com/users/jabclab/followers","following_url":"https://api.github.com/users/jabclab/following{/other_user}","gists_url":"https://api.github.com/users/jabclab/gists{/gist_id}","starred_url":"https://api.github.com/users/jabclab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jabclab/subscriptions","organizations_url":"https://api.github.com/users/jabclab/orgs","repos_url":"https://api.github.com/users/jabclab/repos","events_url":"https://api.github.com/users/jabclab/events{/privacy}","received_events_url":"https://api.github.com/users/jabclab/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/pulls/1/commits","review_comments_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/pulls/1/comments","review_comment_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/issues/1/comments","statuses_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/statuses/248aa915999d6b35ab930c0c7c83558882389375","head":{"label":"nbrl:initial-functionality","ref":"initial-functionality","sha":"248aa915999d6b35ab930c0c7c83558882389375","user":{"login":"nbrl","id":7620088,"avatar_url":"https://avatars.githubusercontent.com/u/7620088?v=3","gravatar_id":"","url":"https://api.github.com/users/nbrl","html_url":"https://github.com/nbrl","followers_url":"https://api.github.com/users/nbrl/followers","following_url":"https://api.github.com/users/nbrl/following{/other_user}","gists_url":"https://api.github.com/users/nbrl/gists{/gist_id}","starred_url":"https://api.github.com/users/nbrl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nbrl/subscriptions","organizations_url":"https://api.github.com/users/nbrl/orgs","repos_url":"https://api.github.com/users/nbrl/repos","events_url":"https://api.github.com/users/nbrl/events{/privacy}","received_events_url":"https://api.github.com/users/nbrl/received_events","type":"User","site_admin":false},"repo":{"id":32318178,"name":"advocate-things-js-sdk","full_name":"nbrl/advocate-things-js-sdk","owner":{"login":"nbrl","id":7620088,"avatar_url":"https://avatars.githubusercontent.com/u/7620088?v=3","gravatar_id":"","url":"https://api.github.com/users/nbrl","html_url":"https://github.com/nbrl","followers_url":"https://api.github.com/users/nbrl/followers","following_url":"https://api.github.com/users/nbrl/following{/other_user}","gists_url":"https://api.github.com/users/nbrl/gists{/gist_id}","starred_url":"https://api.github.com/users/nbrl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nbrl/subscriptions","organizations_url":"https://api.github.com/users/nbrl/orgs","repos_url":"https://api.github.com/users/nbrl/repos","events_url":"https://api.github.com/users/nbrl/events{/privacy}","received_events_url":"https://api.github.com/users/nbrl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nbrl/advocate-things-js-sdk","description":"","fork":true,"url":"https://api.github.com/repos/nbrl/advocate-things-js-sdk","forks_url":"https://api.github.com/repos/nbrl/advocate-things-js-sdk/forks","keys_url":"https://api.github.com/repos/nbrl/advocate-things-js-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nbrl/advocate-things-js-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nbrl/advocate-things-js-sdk/teams","hooks_url":"https://api.github.com/repos/nbrl/advocate-things-js-sdk/hooks","issue_events_url":"https://api.github.com/repos/nbrl/advocate-things-js-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/nbrl/advocate-things-js-sdk/events","assignees_url":"https://api.github.com/repos/nbrl/advocate-things-js-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/nbrl/advocate-things-js-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/nbrl/advocate-things-js-sdk/tags","blobs_url":"https://api.github.com/repos/nbrl/advocate-things-js-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nbrl/advocate-things-js-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nbrl/advocate-things-js-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/nbrl/advocate-things-js-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nbrl/advocate-things-js-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/nbrl/advocate-things-js-sdk/languages","stargazers_url":"https://api.github.com/repos/nbrl/advocate-things-js-sdk/stargazers","contributors_url":"https://api.github.com/repos/nbrl/advocate-things-js-sdk/contributors","subscribers_url":"https://api.github.com/repos/nbrl/advocate-things-js-sdk/subscribers","subscription_url":"https://api.github.com/repos/nbrl/advocate-things-js-sdk/subscription","commits_url":"https://api.github.com/repos/nbrl/advocate-things-js-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/nbrl/advocate-things-js-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/nbrl/advocate-things-js-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/nbrl/advocate-things-js-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/nbrl/advocate-things-js-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/nbrl/advocate-things-js-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nbrl/advocate-things-js-sdk/merges","archive_url":"https://api.github.com/repos/nbrl/advocate-things-js-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nbrl/advocate-things-js-sdk/downloads","issues_url":"https://api.github.com/repos/nbrl/advocate-things-js-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/nbrl/advocate-things-js-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/nbrl/advocate-things-js-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/nbrl/advocate-things-js-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nbrl/advocate-things-js-sdk/labels{/name}","releases_url":"https://api.github.com/repos/nbrl/advocate-things-js-sdk/releases{/id}","created_at":"2015-03-16T10:42:13Z","updated_at":"2015-03-31T14:43:48Z","pushed_at":"2015-04-01T09:26:57Z","git_url":"git://github.com/nbrl/advocate-things-js-sdk.git","ssh_url":"git@github.com:nbrl/advocate-things-js-sdk.git","clone_url":"https://github.com/nbrl/advocate-things-js-sdk.git","svn_url":"https://github.com/nbrl/advocate-things-js-sdk","homepage":null,"size":238,"stargazers_count":0,"watchers_count":0,"language":null,"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":0,"default_branch":"master"}},"base":{"label":"digitalanimal:master","ref":"master","sha":"83e10f67024d4004f3283d2f871c3b9618a6da5a","user":{"login":"digitalanimal","id":2040430,"avatar_url":"https://avatars.githubusercontent.com/u/2040430?v=3","gravatar_id":"","url":"https://api.github.com/users/digitalanimal","html_url":"https://github.com/digitalanimal","followers_url":"https://api.github.com/users/digitalanimal/followers","following_url":"https://api.github.com/users/digitalanimal/following{/other_user}","gists_url":"https://api.github.com/users/digitalanimal/gists{/gist_id}","starred_url":"https://api.github.com/users/digitalanimal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/digitalanimal/subscriptions","organizations_url":"https://api.github.com/users/digitalanimal/orgs","repos_url":"https://api.github.com/users/digitalanimal/repos","events_url":"https://api.github.com/users/digitalanimal/events{/privacy}","received_events_url":"https://api.github.com/users/digitalanimal/received_events","type":"Organization","site_admin":false},"repo":{"id":32318170,"name":"advocate-things-js-sdk","full_name":"digitalanimal/advocate-things-js-sdk","owner":{"login":"digitalanimal","id":2040430,"avatar_url":"https://avatars.githubusercontent.com/u/2040430?v=3","gravatar_id":"","url":"https://api.github.com/users/digitalanimal","html_url":"https://github.com/digitalanimal","followers_url":"https://api.github.com/users/digitalanimal/followers","following_url":"https://api.github.com/users/digitalanimal/following{/other_user}","gists_url":"https://api.github.com/users/digitalanimal/gists{/gist_id}","starred_url":"https://api.github.com/users/digitalanimal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/digitalanimal/subscriptions","organizations_url":"https://api.github.com/users/digitalanimal/orgs","repos_url":"https://api.github.com/users/digitalanimal/repos","events_url":"https://api.github.com/users/digitalanimal/events{/privacy}","received_events_url":"https://api.github.com/users/digitalanimal/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/digitalanimal/advocate-things-js-sdk","description":"","fork":false,"url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk","forks_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/forks","keys_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/teams","hooks_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/hooks","issue_events_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/events","assignees_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/tags","blobs_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/languages","stargazers_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/stargazers","contributors_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/contributors","subscribers_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/subscribers","subscription_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/subscription","commits_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/merges","archive_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/downloads","issues_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/labels{/name}","releases_url":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/releases{/id}","created_at":"2015-03-16T10:41:51Z","updated_at":"2015-03-31T14:43:28Z","pushed_at":"2015-04-01T09:15:31Z","git_url":"git://github.com/digitalanimal/advocate-things-js-sdk.git","ssh_url":"git@github.com:digitalanimal/advocate-things-js-sdk.git","clone_url":"https://github.com/digitalanimal/advocate-things-js-sdk.git","svn_url":"https://github.com/digitalanimal/advocate-things-js-sdk","homepage":null,"size":115,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/pulls/1"},"html":{"href":"https://github.com/digitalanimal/advocate-things-js-sdk/pull/1"},"issue":{"href":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/issues/1"},"comments":{"href":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/digitalanimal/advocate-things-js-sdk/statuses/248aa915999d6b35ab930c0c7c83558882389375"}}}}