{"action":"created","comment":{"url":"https://api.github.com/repos/e-mission/e-mission-server/pulls/comments/71021479","id":71021479,"diff_hunk":"@@ -0,0 +1,68 @@\n+# Standard imports\n+import json\n+import requests\n+import logging\n+import arrow\n+import attrdict as ad\n+\n+# Our imports\n+import emission.core.get_database as edb\n+import emission.net.ext_service.habitica.proxy as proxy\n+import emission.analysis.result.metrics.simple_metrics as earmts\n+import emission.analysis.result.metrics.time_grouping as earmt\n+\n+\n+\n+def create_habit(user_id, new_habit):\n+  method_uri = \"/api/v3/tasks/user\"\n+  #how to pass in params? https://habitica.com/apidoc/#api-Task-GetUserTasks\n+  #FIX! right now it's returning all types of tasks, I want it to return only \"habits\"\n+  params = {'type': \"habits\"}","path":"emission/net/ext_service/habitica/sync_habitica.py","position":20,"original_position":20,"commit_id":"286d0132cc898aa070a362fa114e005395df7134","original_commit_id":"286d0132cc898aa070a362fa114e005395df7134","user":{"login":"juemura","id":1196510,"avatar_url":"https://avatars.githubusercontent.com/u/1196510?v=3","gravatar_id":"","url":"https://api.github.com/users/juemura","html_url":"https://github.com/juemura","followers_url":"https://api.github.com/users/juemura/followers","following_url":"https://api.github.com/users/juemura/following{/other_user}","gists_url":"https://api.github.com/users/juemura/gists{/gist_id}","starred_url":"https://api.github.com/users/juemura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juemura/subscriptions","organizations_url":"https://api.github.com/users/juemura/orgs","repos_url":"https://api.github.com/users/juemura/repos","events_url":"https://api.github.com/users/juemura/events{/privacy}","received_events_url":"https://api.github.com/users/juemura/received_events","type":"User","site_admin":false},"body":"I didn't, this doesn't actually work. It's still returning all types of tasks.","created_at":"2016-07-15T18:39:49Z","updated_at":"2016-07-15T18:39:49Z","html_url":"https://github.com/e-mission/e-mission-server/pull/314#discussion_r71021479","pull_request_url":"https://api.github.com/repos/e-mission/e-mission-server/pulls/314","_links":{"self":{"href":"https://api.github.com/repos/e-mission/e-mission-server/pulls/comments/71021479"},"html":{"href":"https://github.com/e-mission/e-mission-server/pull/314#discussion_r71021479"},"pull_request":{"href":"https://api.github.com/repos/e-mission/e-mission-server/pulls/314"}}},"pull_request":{"url":"https://api.github.com/repos/e-mission/e-mission-server/pulls/314","id":77613105,"html_url":"https://github.com/e-mission/e-mission-server/pull/314","diff_url":"https://github.com/e-mission/e-mission-server/pull/314.diff","patch_url":"https://github.com/e-mission/e-mission-server/pull/314.patch","issue_url":"https://api.github.com/repos/e-mission/e-mission-server/issues/314","number":314,"state":"open","locked":false,"title":"Habitica autocheck","user":{"login":"juemura","id":1196510,"avatar_url":"https://avatars.githubusercontent.com/u/1196510?v=3","gravatar_id":"","url":"https://api.github.com/users/juemura","html_url":"https://github.com/juemura","followers_url":"https://api.github.com/users/juemura/followers","following_url":"https://api.github.com/users/juemura/following{/other_user}","gists_url":"https://api.github.com/users/juemura/gists{/gist_id}","starred_url":"https://api.github.com/users/juemura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juemura/subscriptions","organizations_url":"https://api.github.com/users/juemura/orgs","repos_url":"https://api.github.com/users/juemura/repos","events_url":"https://api.github.com/users/juemura/events{/privacy}","received_events_url":"https://api.github.com/users/juemura/received_events","type":"User","site_admin":false},"body":"It's missing the tests, I'll do them today.\r\nI had some questions, which are all indicated by \"FIX!\"\r\n","created_at":"2016-07-15T13:11:17Z","updated_at":"2016-07-15T18:39:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"65cc4cc6c69f4089050229cc2ce3e64c24829140","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/e-mission/e-mission-server/pulls/314/commits","review_comments_url":"https://api.github.com/repos/e-mission/e-mission-server/pulls/314/comments","review_comment_url":"https://api.github.com/repos/e-mission/e-mission-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/e-mission/e-mission-server/issues/314/comments","statuses_url":"https://api.github.com/repos/e-mission/e-mission-server/statuses/286d0132cc898aa070a362fa114e005395df7134","head":{"label":"juemura:habitica_autocheck","ref":"habitica_autocheck","sha":"286d0132cc898aa070a362fa114e005395df7134","user":{"login":"juemura","id":1196510,"avatar_url":"https://avatars.githubusercontent.com/u/1196510?v=3","gravatar_id":"","url":"https://api.github.com/users/juemura","html_url":"https://github.com/juemura","followers_url":"https://api.github.com/users/juemura/followers","following_url":"https://api.github.com/users/juemura/following{/other_user}","gists_url":"https://api.github.com/users/juemura/gists{/gist_id}","starred_url":"https://api.github.com/users/juemura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juemura/subscriptions","organizations_url":"https://api.github.com/users/juemura/orgs","repos_url":"https://api.github.com/users/juemura/repos","events_url":"https://api.github.com/users/juemura/events{/privacy}","received_events_url":"https://api.github.com/users/juemura/received_events","type":"User","site_admin":false},"repo":{"id":62175853,"name":"e-mission-server","full_name":"juemura/e-mission-server","owner":{"login":"juemura","id":1196510,"avatar_url":"https://avatars.githubusercontent.com/u/1196510?v=3","gravatar_id":"","url":"https://api.github.com/users/juemura","html_url":"https://github.com/juemura","followers_url":"https://api.github.com/users/juemura/followers","following_url":"https://api.github.com/users/juemura/following{/other_user}","gists_url":"https://api.github.com/users/juemura/gists{/gist_id}","starred_url":"https://api.github.com/users/juemura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juemura/subscriptions","organizations_url":"https://api.github.com/users/juemura/orgs","repos_url":"https://api.github.com/users/juemura/repos","events_url":"https://api.github.com/users/juemura/events{/privacy}","received_events_url":"https://api.github.com/users/juemura/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/juemura/e-mission-server","description":"The backend (server) code for the e-mission server","fork":true,"url":"https://api.github.com/repos/juemura/e-mission-server","forks_url":"https://api.github.com/repos/juemura/e-mission-server/forks","keys_url":"https://api.github.com/repos/juemura/e-mission-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/juemura/e-mission-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/juemura/e-mission-server/teams","hooks_url":"https://api.github.com/repos/juemura/e-mission-server/hooks","issue_events_url":"https://api.github.com/repos/juemura/e-mission-server/issues/events{/number}","events_url":"https://api.github.com/repos/juemura/e-mission-server/events","assignees_url":"https://api.github.com/repos/juemura/e-mission-server/assignees{/user}","branches_url":"https://api.github.com/repos/juemura/e-mission-server/branches{/branch}","tags_url":"https://api.github.com/repos/juemura/e-mission-server/tags","blobs_url":"https://api.github.com/repos/juemura/e-mission-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/juemura/e-mission-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/juemura/e-mission-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/juemura/e-mission-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/juemura/e-mission-server/statuses/{sha}","languages_url":"https://api.github.com/repos/juemura/e-mission-server/languages","stargazers_url":"https://api.github.com/repos/juemura/e-mission-server/stargazers","contributors_url":"https://api.github.com/repos/juemura/e-mission-server/contributors","subscribers_url":"https://api.github.com/repos/juemura/e-mission-server/subscribers","subscription_url":"https://api.github.com/repos/juemura/e-mission-server/subscription","commits_url":"https://api.github.com/repos/juemura/e-mission-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/juemura/e-mission-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/juemura/e-mission-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/juemura/e-mission-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/juemura/e-mission-server/contents/{+path}","compare_url":"https://api.github.com/repos/juemura/e-mission-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/juemura/e-mission-server/merges","archive_url":"https://api.github.com/repos/juemura/e-mission-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/juemura/e-mission-server/downloads","issues_url":"https://api.github.com/repos/juemura/e-mission-server/issues{/number}","pulls_url":"https://api.github.com/repos/juemura/e-mission-server/pulls{/number}","milestones_url":"https://api.github.com/repos/juemura/e-mission-server/milestones{/number}","notifications_url":"https://api.github.com/repos/juemura/e-mission-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/juemura/e-mission-server/labels{/name}","releases_url":"https://api.github.com/repos/juemura/e-mission-server/releases{/id}","deployments_url":"https://api.github.com/repos/juemura/e-mission-server/deployments","created_at":"2016-06-28T21:35:53Z","updated_at":"2016-06-28T21:36:01Z","pushed_at":"2016-07-15T13:09:37Z","git_url":"git://github.com/juemura/e-mission-server.git","ssh_url":"git@github.com:juemura/e-mission-server.git","clone_url":"https://github.com/juemura/e-mission-server.git","svn_url":"https://github.com/juemura/e-mission-server","homepage":"https://e-mission.eecs.berkeley.edu","size":92409,"stargazers_count":0,"watchers_count":0,"language":"Jupyter Notebook","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":"e-mission:master","ref":"master","sha":"14fec6809e2e3acf9fced47b8f7ad96028dfefd3","user":{"login":"e-mission","id":10713694,"avatar_url":"https://avatars.githubusercontent.com/u/10713694?v=3","gravatar_id":"","url":"https://api.github.com/users/e-mission","html_url":"https://github.com/e-mission","followers_url":"https://api.github.com/users/e-mission/followers","following_url":"https://api.github.com/users/e-mission/following{/other_user}","gists_url":"https://api.github.com/users/e-mission/gists{/gist_id}","starred_url":"https://api.github.com/users/e-mission/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/e-mission/subscriptions","organizations_url":"https://api.github.com/users/e-mission/orgs","repos_url":"https://api.github.com/users/e-mission/repos","events_url":"https://api.github.com/users/e-mission/events{/privacy}","received_events_url":"https://api.github.com/users/e-mission/received_events","type":"Organization","site_admin":false},"repo":{"id":26307245,"name":"e-mission-server","full_name":"e-mission/e-mission-server","owner":{"login":"e-mission","id":10713694,"avatar_url":"https://avatars.githubusercontent.com/u/10713694?v=3","gravatar_id":"","url":"https://api.github.com/users/e-mission","html_url":"https://github.com/e-mission","followers_url":"https://api.github.com/users/e-mission/followers","following_url":"https://api.github.com/users/e-mission/following{/other_user}","gists_url":"https://api.github.com/users/e-mission/gists{/gist_id}","starred_url":"https://api.github.com/users/e-mission/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/e-mission/subscriptions","organizations_url":"https://api.github.com/users/e-mission/orgs","repos_url":"https://api.github.com/users/e-mission/repos","events_url":"https://api.github.com/users/e-mission/events{/privacy}","received_events_url":"https://api.github.com/users/e-mission/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/e-mission/e-mission-server","description":"The backend (server) code for the e-mission server","fork":false,"url":"https://api.github.com/repos/e-mission/e-mission-server","forks_url":"https://api.github.com/repos/e-mission/e-mission-server/forks","keys_url":"https://api.github.com/repos/e-mission/e-mission-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/e-mission/e-mission-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/e-mission/e-mission-server/teams","hooks_url":"https://api.github.com/repos/e-mission/e-mission-server/hooks","issue_events_url":"https://api.github.com/repos/e-mission/e-mission-server/issues/events{/number}","events_url":"https://api.github.com/repos/e-mission/e-mission-server/events","assignees_url":"https://api.github.com/repos/e-mission/e-mission-server/assignees{/user}","branches_url":"https://api.github.com/repos/e-mission/e-mission-server/branches{/branch}","tags_url":"https://api.github.com/repos/e-mission/e-mission-server/tags","blobs_url":"https://api.github.com/repos/e-mission/e-mission-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/e-mission/e-mission-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/e-mission/e-mission-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/e-mission/e-mission-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/e-mission/e-mission-server/statuses/{sha}","languages_url":"https://api.github.com/repos/e-mission/e-mission-server/languages","stargazers_url":"https://api.github.com/repos/e-mission/e-mission-server/stargazers","contributors_url":"https://api.github.com/repos/e-mission/e-mission-server/contributors","subscribers_url":"https://api.github.com/repos/e-mission/e-mission-server/subscribers","subscription_url":"https://api.github.com/repos/e-mission/e-mission-server/subscription","commits_url":"https://api.github.com/repos/e-mission/e-mission-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/e-mission/e-mission-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/e-mission/e-mission-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/e-mission/e-mission-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/e-mission/e-mission-server/contents/{+path}","compare_url":"https://api.github.com/repos/e-mission/e-mission-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/e-mission/e-mission-server/merges","archive_url":"https://api.github.com/repos/e-mission/e-mission-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/e-mission/e-mission-server/downloads","issues_url":"https://api.github.com/repos/e-mission/e-mission-server/issues{/number}","pulls_url":"https://api.github.com/repos/e-mission/e-mission-server/pulls{/number}","milestones_url":"https://api.github.com/repos/e-mission/e-mission-server/milestones{/number}","notifications_url":"https://api.github.com/repos/e-mission/e-mission-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/e-mission/e-mission-server/labels{/name}","releases_url":"https://api.github.com/repos/e-mission/e-mission-server/releases{/id}","deployments_url":"https://api.github.com/repos/e-mission/e-mission-server/deployments","created_at":"2014-11-07T06:39:02Z","updated_at":"2016-06-11T09:09:56Z","pushed_at":"2016-07-15T13:11:17Z","git_url":"git://github.com/e-mission/e-mission-server.git","ssh_url":"git@github.com:e-mission/e-mission-server.git","clone_url":"https://github.com/e-mission/e-mission-server.git","svn_url":"https://github.com/e-mission/e-mission-server","homepage":"https://e-mission.eecs.berkeley.edu","size":92905,"stargazers_count":2,"watchers_count":2,"language":"Jupyter Notebook","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":29,"mirror_url":null,"open_issues_count":55,"forks":29,"open_issues":55,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/e-mission/e-mission-server/pulls/314"},"html":{"href":"https://github.com/e-mission/e-mission-server/pull/314"},"issue":{"href":"https://api.github.com/repos/e-mission/e-mission-server/issues/314"},"comments":{"href":"https://api.github.com/repos/e-mission/e-mission-server/issues/314/comments"},"review_comments":{"href":"https://api.github.com/repos/e-mission/e-mission-server/pulls/314/comments"},"review_comment":{"href":"https://api.github.com/repos/e-mission/e-mission-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/e-mission/e-mission-server/pulls/314/commits"},"statuses":{"href":"https://api.github.com/repos/e-mission/e-mission-server/statuses/286d0132cc898aa070a362fa114e005395df7134"}}}}
{"actor":{"display_login":"juemura"}}