{"action":"created","comment":{"url":"https://api.github.com/repos/kvangent/PokeAlarm/pulls/comments/80180727","id":80180727,"diff_hunk":"@@ -0,0 +1,89 @@\n+#Setup Logging\n+import logging\n+log = logging.getLogger(__name__)\n+\n+#Local modules\n+from ..alarm import Alarm\n+from ..utils import *\n+#Bot Implementation Requirements\n+import requests\n+from json import dumps as jsondumps\n+\n+\n+class Groupme_Alarm(Alarm):\n+  # notice: groupme does NOT support percent signs (%) in the message.\n+  # I do not know how to fix this. Somebody fix this.\n+  _defaults = {\n+  'pokemon':{\n+  'location_name':\"<pkmn> until <24h_time>\",\n+      'text':\"<pkmn> here until <24h_time> (<time_left>).\\n IV: <atk>/<dfs>/<sta> \\n Move 1: <move1> \\n Move 2: <move2>\"\n+    },\n+    'pokestop':{\n+      'location_name':\"Lured Pokestop\",\n+      'text':\"A pokestop has been lured. Lure will expire at <24h_time> (<time_left>).\"\n+    },\n+    'gym':{\n+      'location_name':\"Recently fallend gym\",\n+      'text':\"A Team <old_team> gym has fallen and is now controlled by <new_team>\"\n+    }\n+  }\n+\n+  #Gather settings and create alarm\n+  def __init__(self, settings):\n+    self.bot_id = settings.get('bot_id')\n+    self.group_id = settings.get('group_id')\n+    #Set Alerts\n+    self.pokemon = self.set_alert(settings.get('pokemon', {}), self._defaults['pokemon'])\n+    self.pokestop = self.set_alert(settings.get('pokestop', {}), self._defaults['pokestop'])\n+    self.gym = self.set_alert(settings.get('gyms', {}), self._defaults['gym'])\n+    log.info('Groupme Bot Sending')\n+\n+  #(Re)establishes Service connection\n+  def connect(self):\n+    log.info('Groupme bot connected (even though it doesnt really need to connect)')\n+\n+  #Set the appropriate settings for each alert\n+  def set_alert(self, settings, default):\n+    alert={","path":"alarms/Groupme/groupme_alarm.py","position":47,"original_position":47,"commit_id":"bb72c9de479b04d665bcc3a90e9ff0ef3857e4cc","original_commit_id":"bb72c9de479b04d665bcc3a90e9ff0ef3857e4cc","user":{"login":"kvangent","id":10712294,"avatar_url":"https://avatars.githubusercontent.com/u/10712294?v=3","gravatar_id":"","url":"https://api.github.com/users/kvangent","html_url":"https://github.com/kvangent","followers_url":"https://api.github.com/users/kvangent/followers","following_url":"https://api.github.com/users/kvangent/following{/other_user}","gists_url":"https://api.github.com/users/kvangent/gists{/gist_id}","starred_url":"https://api.github.com/users/kvangent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvangent/subscriptions","organizations_url":"https://api.github.com/users/kvangent/orgs","repos_url":"https://api.github.com/users/kvangent/repos","events_url":"https://api.github.com/users/kvangent/events{/privacy}","received_events_url":"https://api.github.com/users/kvangent/received_events","type":"User","site_admin":false},"body":"Try to keep the style consistent throughout code. You have `args = {` below and `alert={` here. Also some indentation issues.","created_at":"2016-09-23T04:36:19Z","updated_at":"2016-09-23T04:41:43Z","html_url":"https://github.com/kvangent/PokeAlarm/pull/235#discussion_r80180727","pull_request_url":"https://api.github.com/repos/kvangent/PokeAlarm/pulls/235","_links":{"self":{"href":"https://api.github.com/repos/kvangent/PokeAlarm/pulls/comments/80180727"},"html":{"href":"https://github.com/kvangent/PokeAlarm/pull/235#discussion_r80180727"},"pull_request":{"href":"https://api.github.com/repos/kvangent/PokeAlarm/pulls/235"}}},"pull_request":{"url":"https://api.github.com/repos/kvangent/PokeAlarm/pulls/235","id":86452219,"html_url":"https://github.com/kvangent/PokeAlarm/pull/235","diff_url":"https://github.com/kvangent/PokeAlarm/pull/235.diff","patch_url":"https://github.com/kvangent/PokeAlarm/pull/235.patch","issue_url":"https://api.github.com/repos/kvangent/PokeAlarm/issues/235","number":235,"state":"open","locked":false,"title":"Groupme support","user":{"login":"RADiEnCe","id":10362952,"avatar_url":"https://avatars.githubusercontent.com/u/10362952?v=3","gravatar_id":"","url":"https://api.github.com/users/RADiEnCe","html_url":"https://github.com/RADiEnCe","followers_url":"https://api.github.com/users/RADiEnCe/followers","following_url":"https://api.github.com/users/RADiEnCe/following{/other_user}","gists_url":"https://api.github.com/users/RADiEnCe/gists{/gist_id}","starred_url":"https://api.github.com/users/RADiEnCe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RADiEnCe/subscriptions","organizations_url":"https://api.github.com/users/RADiEnCe/orgs","repos_url":"https://api.github.com/users/RADiEnCe/repos","events_url":"https://api.github.com/users/RADiEnCe/events{/privacy}","received_events_url":"https://api.github.com/users/RADiEnCe/received_events","type":"User","site_admin":false},"body":"<!--- PULL REQUESTS CREATED NOT USING THE BELOW TEMPLATE WILL BE CLOSED WITHOUT RESPONSE --->\r\n<!--- PULL REQUESTS CREATED NOT USING THE BELOW TEMPLATE WILL BE CLOSED WITHOUT RESPONSE --->\r\n<!--- PULL REQUESTS CREATED NOT USING THE BELOW TEMPLATE WILL BE CLOSED WITHOUT RESPONSE --->\r\n<!--- PULL REQUESTS CREATED NOT USING THE BELOW TEMPLATE WILL BE CLOSED WITHOUT RESPONSE --->\r\n\r\n\r\n## Description\r\n<!--- Describe your changes in detail -->\r\nAdded support for GroupMe\r\n## How Has This Been Tested?\r\n<!--- Please describe in detail how you tested your changes. -->\r\n<!--- Include details of your testing environment, and the tests you ran to -->\r\n<!--- see how your change affects other areas of the code, etc. -->\r\nTested on my own computer\r\n## Screenshots (if appropriate):\r\n\r\n## Types of changes\r\n<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n\r\n## Wiki Update\r\n<!--- Please create a Wiki page (or snippet) describing how to use your changes --->\r\n<!--- Please keep them simple and user friendly                                  --->\r\nSee alarms.json.default for how to configurate.\r\n## Checklist:\r\n<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->\r\n- [x] My code follows the code style of this project.\r\n- [ ] My change requires a change to the documentation.\r\n- [ ] I have updated the documentation accordingly.\r\n","created_at":"2016-09-23T04:22:26Z","updated_at":"2016-09-23T04:41:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6f8fec77de4227e7865e6ffbdd743026761ccfdc","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/kvangent/PokeAlarm/pulls/235/commits","review_comments_url":"https://api.github.com/repos/kvangent/PokeAlarm/pulls/235/comments","review_comment_url":"https://api.github.com/repos/kvangent/PokeAlarm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kvangent/PokeAlarm/issues/235/comments","statuses_url":"https://api.github.com/repos/kvangent/PokeAlarm/statuses/bb72c9de479b04d665bcc3a90e9ff0ef3857e4cc","head":{"label":"RADiEnCe:groupme-support","ref":"groupme-support","sha":"bb72c9de479b04d665bcc3a90e9ff0ef3857e4cc","user":{"login":"RADiEnCe","id":10362952,"avatar_url":"https://avatars.githubusercontent.com/u/10362952?v=3","gravatar_id":"","url":"https://api.github.com/users/RADiEnCe","html_url":"https://github.com/RADiEnCe","followers_url":"https://api.github.com/users/RADiEnCe/followers","following_url":"https://api.github.com/users/RADiEnCe/following{/other_user}","gists_url":"https://api.github.com/users/RADiEnCe/gists{/gist_id}","starred_url":"https://api.github.com/users/RADiEnCe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RADiEnCe/subscriptions","organizations_url":"https://api.github.com/users/RADiEnCe/orgs","repos_url":"https://api.github.com/users/RADiEnCe/repos","events_url":"https://api.github.com/users/RADiEnCe/events{/privacy}","received_events_url":"https://api.github.com/users/RADiEnCe/received_events","type":"User","site_admin":false},"repo":{"id":68552377,"name":"PokeAlarm","full_name":"RADiEnCe/PokeAlarm","owner":{"login":"RADiEnCe","id":10362952,"avatar_url":"https://avatars.githubusercontent.com/u/10362952?v=3","gravatar_id":"","url":"https://api.github.com/users/RADiEnCe","html_url":"https://github.com/RADiEnCe","followers_url":"https://api.github.com/users/RADiEnCe/followers","following_url":"https://api.github.com/users/RADiEnCe/following{/other_user}","gists_url":"https://api.github.com/users/RADiEnCe/gists{/gist_id}","starred_url":"https://api.github.com/users/RADiEnCe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RADiEnCe/subscriptions","organizations_url":"https://api.github.com/users/RADiEnCe/orgs","repos_url":"https://api.github.com/users/RADiEnCe/repos","events_url":"https://api.github.com/users/RADiEnCe/events{/privacy}","received_events_url":"https://api.github.com/users/RADiEnCe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/RADiEnCe/PokeAlarm","description":"PokeAlarm is a third party extension for PokemonGo-Map that allows you to receive external notifications via the service of your choice","fork":true,"url":"https://api.github.com/repos/RADiEnCe/PokeAlarm","forks_url":"https://api.github.com/repos/RADiEnCe/PokeAlarm/forks","keys_url":"https://api.github.com/repos/RADiEnCe/PokeAlarm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RADiEnCe/PokeAlarm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RADiEnCe/PokeAlarm/teams","hooks_url":"https://api.github.com/repos/RADiEnCe/PokeAlarm/hooks","issue_events_url":"https://api.github.com/repos/RADiEnCe/PokeAlarm/issues/events{/number}","events_url":"https://api.github.com/repos/RADiEnCe/PokeAlarm/events","assignees_url":"https://api.github.com/repos/RADiEnCe/PokeAlarm/assignees{/user}","branches_url":"https://api.github.com/repos/RADiEnCe/PokeAlarm/branches{/branch}","tags_url":"https://api.github.com/repos/RADiEnCe/PokeAlarm/tags","blobs_url":"https://api.github.com/repos/RADiEnCe/PokeAlarm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RADiEnCe/PokeAlarm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RADiEnCe/PokeAlarm/git/refs{/sha}","trees_url":"https://api.github.com/repos/RADiEnCe/PokeAlarm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RADiEnCe/PokeAlarm/statuses/{sha}","languages_url":"https://api.github.com/repos/RADiEnCe/PokeAlarm/languages","stargazers_url":"https://api.github.com/repos/RADiEnCe/PokeAlarm/stargazers","contributors_url":"https://api.github.com/repos/RADiEnCe/PokeAlarm/contributors","subscribers_url":"https://api.github.com/repos/RADiEnCe/PokeAlarm/subscribers","subscription_url":"https://api.github.com/repos/RADiEnCe/PokeAlarm/subscription","commits_url":"https://api.github.com/repos/RADiEnCe/PokeAlarm/commits{/sha}","git_commits_url":"https://api.github.com/repos/RADiEnCe/PokeAlarm/git/commits{/sha}","comments_url":"https://api.github.com/repos/RADiEnCe/PokeAlarm/comments{/number}","issue_comment_url":"https://api.github.com/repos/RADiEnCe/PokeAlarm/issues/comments{/number}","contents_url":"https://api.github.com/repos/RADiEnCe/PokeAlarm/contents/{+path}","compare_url":"https://api.github.com/repos/RADiEnCe/PokeAlarm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RADiEnCe/PokeAlarm/merges","archive_url":"https://api.github.com/repos/RADiEnCe/PokeAlarm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RADiEnCe/PokeAlarm/downloads","issues_url":"https://api.github.com/repos/RADiEnCe/PokeAlarm/issues{/number}","pulls_url":"https://api.github.com/repos/RADiEnCe/PokeAlarm/pulls{/number}","milestones_url":"https://api.github.com/repos/RADiEnCe/PokeAlarm/milestones{/number}","notifications_url":"https://api.github.com/repos/RADiEnCe/PokeAlarm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RADiEnCe/PokeAlarm/labels{/name}","releases_url":"https://api.github.com/repos/RADiEnCe/PokeAlarm/releases{/id}","deployments_url":"https://api.github.com/repos/RADiEnCe/PokeAlarm/deployments","created_at":"2016-09-18T23:14:05Z","updated_at":"2016-09-18T23:14:06Z","pushed_at":"2016-09-23T04:20:34Z","git_url":"git://github.com/RADiEnCe/PokeAlarm.git","ssh_url":"git@github.com:RADiEnCe/PokeAlarm.git","clone_url":"https://github.com/RADiEnCe/PokeAlarm.git","svn_url":"https://github.com/RADiEnCe/PokeAlarm","homepage":"","size":2878,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"master"}},"base":{"label":"kvangent:iv_alerts","ref":"iv_alerts","sha":"8f27a964be36d3b8bc277ef5f041d33ae9aef7d7","user":{"login":"kvangent","id":10712294,"avatar_url":"https://avatars.githubusercontent.com/u/10712294?v=3","gravatar_id":"","url":"https://api.github.com/users/kvangent","html_url":"https://github.com/kvangent","followers_url":"https://api.github.com/users/kvangent/followers","following_url":"https://api.github.com/users/kvangent/following{/other_user}","gists_url":"https://api.github.com/users/kvangent/gists{/gist_id}","starred_url":"https://api.github.com/users/kvangent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvangent/subscriptions","organizations_url":"https://api.github.com/users/kvangent/orgs","repos_url":"https://api.github.com/users/kvangent/repos","events_url":"https://api.github.com/users/kvangent/events{/privacy}","received_events_url":"https://api.github.com/users/kvangent/received_events","type":"User","site_admin":false},"repo":{"id":64392484,"name":"PokeAlarm","full_name":"kvangent/PokeAlarm","owner":{"login":"kvangent","id":10712294,"avatar_url":"https://avatars.githubusercontent.com/u/10712294?v=3","gravatar_id":"","url":"https://api.github.com/users/kvangent","html_url":"https://github.com/kvangent","followers_url":"https://api.github.com/users/kvangent/followers","following_url":"https://api.github.com/users/kvangent/following{/other_user}","gists_url":"https://api.github.com/users/kvangent/gists{/gist_id}","starred_url":"https://api.github.com/users/kvangent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvangent/subscriptions","organizations_url":"https://api.github.com/users/kvangent/orgs","repos_url":"https://api.github.com/users/kvangent/repos","events_url":"https://api.github.com/users/kvangent/events{/privacy}","received_events_url":"https://api.github.com/users/kvangent/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kvangent/PokeAlarm","description":"PokeAlarm is a third party extension for PokemonGo-Map that allows you to receive external notifications via the service of your choice","fork":false,"url":"https://api.github.com/repos/kvangent/PokeAlarm","forks_url":"https://api.github.com/repos/kvangent/PokeAlarm/forks","keys_url":"https://api.github.com/repos/kvangent/PokeAlarm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kvangent/PokeAlarm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kvangent/PokeAlarm/teams","hooks_url":"https://api.github.com/repos/kvangent/PokeAlarm/hooks","issue_events_url":"https://api.github.com/repos/kvangent/PokeAlarm/issues/events{/number}","events_url":"https://api.github.com/repos/kvangent/PokeAlarm/events","assignees_url":"https://api.github.com/repos/kvangent/PokeAlarm/assignees{/user}","branches_url":"https://api.github.com/repos/kvangent/PokeAlarm/branches{/branch}","tags_url":"https://api.github.com/repos/kvangent/PokeAlarm/tags","blobs_url":"https://api.github.com/repos/kvangent/PokeAlarm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kvangent/PokeAlarm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kvangent/PokeAlarm/git/refs{/sha}","trees_url":"https://api.github.com/repos/kvangent/PokeAlarm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kvangent/PokeAlarm/statuses/{sha}","languages_url":"https://api.github.com/repos/kvangent/PokeAlarm/languages","stargazers_url":"https://api.github.com/repos/kvangent/PokeAlarm/stargazers","contributors_url":"https://api.github.com/repos/kvangent/PokeAlarm/contributors","subscribers_url":"https://api.github.com/repos/kvangent/PokeAlarm/subscribers","subscription_url":"https://api.github.com/repos/kvangent/PokeAlarm/subscription","commits_url":"https://api.github.com/repos/kvangent/PokeAlarm/commits{/sha}","git_commits_url":"https://api.github.com/repos/kvangent/PokeAlarm/git/commits{/sha}","comments_url":"https://api.github.com/repos/kvangent/PokeAlarm/comments{/number}","issue_comment_url":"https://api.github.com/repos/kvangent/PokeAlarm/issues/comments{/number}","contents_url":"https://api.github.com/repos/kvangent/PokeAlarm/contents/{+path}","compare_url":"https://api.github.com/repos/kvangent/PokeAlarm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kvangent/PokeAlarm/merges","archive_url":"https://api.github.com/repos/kvangent/PokeAlarm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kvangent/PokeAlarm/downloads","issues_url":"https://api.github.com/repos/kvangent/PokeAlarm/issues{/number}","pulls_url":"https://api.github.com/repos/kvangent/PokeAlarm/pulls{/number}","milestones_url":"https://api.github.com/repos/kvangent/PokeAlarm/milestones{/number}","notifications_url":"https://api.github.com/repos/kvangent/PokeAlarm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kvangent/PokeAlarm/labels{/name}","releases_url":"https://api.github.com/repos/kvangent/PokeAlarm/releases{/id}","deployments_url":"https://api.github.com/repos/kvangent/PokeAlarm/deployments","created_at":"2016-07-28T12:08:26Z","updated_at":"2016-09-22T17:25:49Z","pushed_at":"2016-09-23T04:22:26Z","git_url":"git://github.com/kvangent/PokeAlarm.git","ssh_url":"git@github.com:kvangent/PokeAlarm.git","clone_url":"https://github.com/kvangent/PokeAlarm.git","svn_url":"https://github.com/kvangent/PokeAlarm","homepage":"","size":5967,"stargazers_count":212,"watchers_count":212,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":101,"mirror_url":null,"open_issues_count":12,"forks":101,"open_issues":12,"watchers":212,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kvangent/PokeAlarm/pulls/235"},"html":{"href":"https://github.com/kvangent/PokeAlarm/pull/235"},"issue":{"href":"https://api.github.com/repos/kvangent/PokeAlarm/issues/235"},"comments":{"href":"https://api.github.com/repos/kvangent/PokeAlarm/issues/235/comments"},"review_comments":{"href":"https://api.github.com/repos/kvangent/PokeAlarm/pulls/235/comments"},"review_comment":{"href":"https://api.github.com/repos/kvangent/PokeAlarm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kvangent/PokeAlarm/pulls/235/commits"},"statuses":{"href":"https://api.github.com/repos/kvangent/PokeAlarm/statuses/bb72c9de479b04d665bcc3a90e9ff0ef3857e4cc"}}}}
{"actor":{"display_login":"kvangent"}}