{"action":"created","comment":{"url":"https://api.github.com/repos/jmduke/corji/pulls/comments/44882191","id":44882191,"diff_hunk":"@@ -0,0 +1,31 @@\n+\"\"\"\n+Special responses to certain user text-input. Can contain images \n+and/or a text response. \n+\"\"\"\n+from collections import namedtuple\n+\n+import requests\n+\n+secrets = []\n+\n+\n+SecretType = namedtuple('SecretType', ['trigger', 'text', 'media'])\n+\n+\n+def load(url):\n+    global piles\n+    payload = requests.get(url).json()\n+    raw_data = payload['feed']['entry']\n+\n+    for row in raw_data:\n+        trigger = row['gsx$trigger']['$t'].strip().lower()\n+        text = row['gsx$text']['$t']\n+        media = row['gsx$media']['$t']\n+        secrets.append(SecretType(trigger, text, media)) \n+\n+\n+def get_secret(possible_trigger):\n+\t\"\"\"Returns relevant secret or none\"\"\"\n+\trelevant_secrets = [s for s in enumerate(secrets) if s.trigger == possible_trigger.strip().lower()]","path":"corji/data_sources/secrets.py","position":29,"original_position":29,"commit_id":"003ed92dc58e50416d748ecbd0fc7b48ffc71afe","original_commit_id":"003ed92dc58e50416d748ecbd0fc7b48ffc71afe","user":{"login":"jmduke","id":461046,"avatar_url":"https://avatars.githubusercontent.com/u/461046?v=3","gravatar_id":"","url":"https://api.github.com/users/jmduke","html_url":"https://github.com/jmduke","followers_url":"https://api.github.com/users/jmduke/followers","following_url":"https://api.github.com/users/jmduke/following{/other_user}","gists_url":"https://api.github.com/users/jmduke/gists{/gist_id}","starred_url":"https://api.github.com/users/jmduke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmduke/subscriptions","organizations_url":"https://api.github.com/users/jmduke/orgs","repos_url":"https://api.github.com/users/jmduke/repos","events_url":"https://api.github.com/users/jmduke/events{/privacy}","received_events_url":"https://api.github.com/users/jmduke/received_events","type":"User","site_admin":false},"body":"you can get rid of `enumerate`","created_at":"2015-11-16T01:15:39Z","updated_at":"2015-11-16T01:15:39Z","html_url":"https://github.com/jmduke/corji/pull/78#discussion_r44882191","pull_request_url":"https://api.github.com/repos/jmduke/corji/pulls/78","_links":{"self":{"href":"https://api.github.com/repos/jmduke/corji/pulls/comments/44882191"},"html":{"href":"https://github.com/jmduke/corji/pull/78#discussion_r44882191"},"pull_request":{"href":"https://api.github.com/repos/jmduke/corji/pulls/78"}}},"pull_request":{"url":"https://api.github.com/repos/jmduke/corji/pulls/78","id":50741666,"html_url":"https://github.com/jmduke/corji/pull/78","diff_url":"https://github.com/jmduke/corji/pull/78.diff","patch_url":"https://github.com/jmduke/corji/pull/78.patch","issue_url":"https://api.github.com/repos/jmduke/corji/issues/78","number":78,"state":"open","locked":false,"title":"Ordered Dashoard, Initial secrets setup","user":{"login":"shepwalker","id":6259443,"avatar_url":"https://avatars.githubusercontent.com/u/6259443?v=3","gravatar_id":"","url":"https://api.github.com/users/shepwalker","html_url":"https://github.com/shepwalker","followers_url":"https://api.github.com/users/shepwalker/followers","following_url":"https://api.github.com/users/shepwalker/following{/other_user}","gists_url":"https://api.github.com/users/shepwalker/gists{/gist_id}","starred_url":"https://api.github.com/users/shepwalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shepwalker/subscriptions","organizations_url":"https://api.github.com/users/shepwalker/orgs","repos_url":"https://api.github.com/users/shepwalker/repos","events_url":"https://api.github.com/users/shepwalker/events{/privacy}","received_events_url":"https://api.github.com/users/shepwalker/received_events","type":"User","site_admin":false},"body":"Still need to write tests, but showing you what's coming down the pipe...","created_at":"2015-11-15T07:31:21Z","updated_at":"2015-11-16T01:15:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"299cad95da0519c70836ec468221b8c0cd6a3361","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jmduke/corji/pulls/78/commits","review_comments_url":"https://api.github.com/repos/jmduke/corji/pulls/78/comments","review_comment_url":"https://api.github.com/repos/jmduke/corji/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jmduke/corji/issues/78/comments","statuses_url":"https://api.github.com/repos/jmduke/corji/statuses/003ed92dc58e50416d748ecbd0fc7b48ffc71afe","head":{"label":"shepwalker:master","ref":"master","sha":"003ed92dc58e50416d748ecbd0fc7b48ffc71afe","user":{"login":"shepwalker","id":6259443,"avatar_url":"https://avatars.githubusercontent.com/u/6259443?v=3","gravatar_id":"","url":"https://api.github.com/users/shepwalker","html_url":"https://github.com/shepwalker","followers_url":"https://api.github.com/users/shepwalker/followers","following_url":"https://api.github.com/users/shepwalker/following{/other_user}","gists_url":"https://api.github.com/users/shepwalker/gists{/gist_id}","starred_url":"https://api.github.com/users/shepwalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shepwalker/subscriptions","organizations_url":"https://api.github.com/users/shepwalker/orgs","repos_url":"https://api.github.com/users/shepwalker/repos","events_url":"https://api.github.com/users/shepwalker/events{/privacy}","received_events_url":"https://api.github.com/users/shepwalker/received_events","type":"User","site_admin":false},"repo":{"id":42966628,"name":"corji","full_name":"shepwalker/corji","owner":{"login":"shepwalker","id":6259443,"avatar_url":"https://avatars.githubusercontent.com/u/6259443?v=3","gravatar_id":"","url":"https://api.github.com/users/shepwalker","html_url":"https://github.com/shepwalker","followers_url":"https://api.github.com/users/shepwalker/followers","following_url":"https://api.github.com/users/shepwalker/following{/other_user}","gists_url":"https://api.github.com/users/shepwalker/gists{/gist_id}","starred_url":"https://api.github.com/users/shepwalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shepwalker/subscriptions","organizations_url":"https://api.github.com/users/shepwalker/orgs","repos_url":"https://api.github.com/users/shepwalker/repos","events_url":"https://api.github.com/users/shepwalker/events{/privacy}","received_events_url":"https://api.github.com/users/shepwalker/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shepwalker/corji","description":"corji.","fork":true,"url":"https://api.github.com/repos/shepwalker/corji","forks_url":"https://api.github.com/repos/shepwalker/corji/forks","keys_url":"https://api.github.com/repos/shepwalker/corji/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shepwalker/corji/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shepwalker/corji/teams","hooks_url":"https://api.github.com/repos/shepwalker/corji/hooks","issue_events_url":"https://api.github.com/repos/shepwalker/corji/issues/events{/number}","events_url":"https://api.github.com/repos/shepwalker/corji/events","assignees_url":"https://api.github.com/repos/shepwalker/corji/assignees{/user}","branches_url":"https://api.github.com/repos/shepwalker/corji/branches{/branch}","tags_url":"https://api.github.com/repos/shepwalker/corji/tags","blobs_url":"https://api.github.com/repos/shepwalker/corji/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shepwalker/corji/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shepwalker/corji/git/refs{/sha}","trees_url":"https://api.github.com/repos/shepwalker/corji/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shepwalker/corji/statuses/{sha}","languages_url":"https://api.github.com/repos/shepwalker/corji/languages","stargazers_url":"https://api.github.com/repos/shepwalker/corji/stargazers","contributors_url":"https://api.github.com/repos/shepwalker/corji/contributors","subscribers_url":"https://api.github.com/repos/shepwalker/corji/subscribers","subscription_url":"https://api.github.com/repos/shepwalker/corji/subscription","commits_url":"https://api.github.com/repos/shepwalker/corji/commits{/sha}","git_commits_url":"https://api.github.com/repos/shepwalker/corji/git/commits{/sha}","comments_url":"https://api.github.com/repos/shepwalker/corji/comments{/number}","issue_comment_url":"https://api.github.com/repos/shepwalker/corji/issues/comments{/number}","contents_url":"https://api.github.com/repos/shepwalker/corji/contents/{+path}","compare_url":"https://api.github.com/repos/shepwalker/corji/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shepwalker/corji/merges","archive_url":"https://api.github.com/repos/shepwalker/corji/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shepwalker/corji/downloads","issues_url":"https://api.github.com/repos/shepwalker/corji/issues{/number}","pulls_url":"https://api.github.com/repos/shepwalker/corji/pulls{/number}","milestones_url":"https://api.github.com/repos/shepwalker/corji/milestones{/number}","notifications_url":"https://api.github.com/repos/shepwalker/corji/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shepwalker/corji/labels{/name}","releases_url":"https://api.github.com/repos/shepwalker/corji/releases{/id}","created_at":"2015-09-22T23:25:06Z","updated_at":"2015-11-12T00:24:44Z","pushed_at":"2015-11-16T01:11:26Z","git_url":"git://github.com/shepwalker/corji.git","ssh_url":"git@github.com:shepwalker/corji.git","clone_url":"https://github.com/shepwalker/corji.git","svn_url":"https://github.com/shepwalker/corji","homepage":null,"size":1160,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"jmduke:master","ref":"master","sha":"3628e2e836d365858c91b69d958e20295a8f72a8","user":{"login":"jmduke","id":461046,"avatar_url":"https://avatars.githubusercontent.com/u/461046?v=3","gravatar_id":"","url":"https://api.github.com/users/jmduke","html_url":"https://github.com/jmduke","followers_url":"https://api.github.com/users/jmduke/followers","following_url":"https://api.github.com/users/jmduke/following{/other_user}","gists_url":"https://api.github.com/users/jmduke/gists{/gist_id}","starred_url":"https://api.github.com/users/jmduke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmduke/subscriptions","organizations_url":"https://api.github.com/users/jmduke/orgs","repos_url":"https://api.github.com/users/jmduke/repos","events_url":"https://api.github.com/users/jmduke/events{/privacy}","received_events_url":"https://api.github.com/users/jmduke/received_events","type":"User","site_admin":false},"repo":{"id":42948556,"name":"corji","full_name":"jmduke/corji","owner":{"login":"jmduke","id":461046,"avatar_url":"https://avatars.githubusercontent.com/u/461046?v=3","gravatar_id":"","url":"https://api.github.com/users/jmduke","html_url":"https://github.com/jmduke","followers_url":"https://api.github.com/users/jmduke/followers","following_url":"https://api.github.com/users/jmduke/following{/other_user}","gists_url":"https://api.github.com/users/jmduke/gists{/gist_id}","starred_url":"https://api.github.com/users/jmduke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmduke/subscriptions","organizations_url":"https://api.github.com/users/jmduke/orgs","repos_url":"https://api.github.com/users/jmduke/repos","events_url":"https://api.github.com/users/jmduke/events{/privacy}","received_events_url":"https://api.github.com/users/jmduke/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jmduke/corji","description":"A distributed*, resilient*, high-availability* CDN (Corgi Delivery Network) using SMS as a transport layer.","fork":false,"url":"https://api.github.com/repos/jmduke/corji","forks_url":"https://api.github.com/repos/jmduke/corji/forks","keys_url":"https://api.github.com/repos/jmduke/corji/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jmduke/corji/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jmduke/corji/teams","hooks_url":"https://api.github.com/repos/jmduke/corji/hooks","issue_events_url":"https://api.github.com/repos/jmduke/corji/issues/events{/number}","events_url":"https://api.github.com/repos/jmduke/corji/events","assignees_url":"https://api.github.com/repos/jmduke/corji/assignees{/user}","branches_url":"https://api.github.com/repos/jmduke/corji/branches{/branch}","tags_url":"https://api.github.com/repos/jmduke/corji/tags","blobs_url":"https://api.github.com/repos/jmduke/corji/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jmduke/corji/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jmduke/corji/git/refs{/sha}","trees_url":"https://api.github.com/repos/jmduke/corji/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jmduke/corji/statuses/{sha}","languages_url":"https://api.github.com/repos/jmduke/corji/languages","stargazers_url":"https://api.github.com/repos/jmduke/corji/stargazers","contributors_url":"https://api.github.com/repos/jmduke/corji/contributors","subscribers_url":"https://api.github.com/repos/jmduke/corji/subscribers","subscription_url":"https://api.github.com/repos/jmduke/corji/subscription","commits_url":"https://api.github.com/repos/jmduke/corji/commits{/sha}","git_commits_url":"https://api.github.com/repos/jmduke/corji/git/commits{/sha}","comments_url":"https://api.github.com/repos/jmduke/corji/comments{/number}","issue_comment_url":"https://api.github.com/repos/jmduke/corji/issues/comments{/number}","contents_url":"https://api.github.com/repos/jmduke/corji/contents/{+path}","compare_url":"https://api.github.com/repos/jmduke/corji/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jmduke/corji/merges","archive_url":"https://api.github.com/repos/jmduke/corji/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jmduke/corji/downloads","issues_url":"https://api.github.com/repos/jmduke/corji/issues{/number}","pulls_url":"https://api.github.com/repos/jmduke/corji/pulls{/number}","milestones_url":"https://api.github.com/repos/jmduke/corji/milestones{/number}","notifications_url":"https://api.github.com/repos/jmduke/corji/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jmduke/corji/labels{/name}","releases_url":"https://api.github.com/repos/jmduke/corji/releases{/id}","created_at":"2015-09-22T17:11:52Z","updated_at":"2015-11-09T16:59:51Z","pushed_at":"2015-11-16T01:11:26Z","git_url":"git://github.com/jmduke/corji.git","ssh_url":"git@github.com:jmduke/corji.git","clone_url":"https://github.com/jmduke/corji.git","svn_url":"https://github.com/jmduke/corji","homepage":"http://corji.club","size":1338,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":13,"forks":2,"open_issues":13,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jmduke/corji/pulls/78"},"html":{"href":"https://github.com/jmduke/corji/pull/78"},"issue":{"href":"https://api.github.com/repos/jmduke/corji/issues/78"},"comments":{"href":"https://api.github.com/repos/jmduke/corji/issues/78/comments"},"review_comments":{"href":"https://api.github.com/repos/jmduke/corji/pulls/78/comments"},"review_comment":{"href":"https://api.github.com/repos/jmduke/corji/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jmduke/corji/pulls/78/commits"},"statuses":{"href":"https://api.github.com/repos/jmduke/corji/statuses/003ed92dc58e50416d748ecbd0fc7b48ffc71afe"}}}}