{"action":"created","comment":{"url":"https://api.github.com/repos/Bopchy/bucketlist-api/pulls/comments/93225973","pull_request_review_id":13747550,"id":93225973,"diff_hunk":"@@ -0,0 +1,167 @@\n+from flask import g\n+from flask_restful import Resource, reqparse\n+\n+from bapi import db\n+from bapi.bucketlist_models import Bucketlist, BucketListItem\n+from bapi.verification import token_auth\n+\n+\n+class CreateBucketlistItem(Resource):\n+\n+    \"\"\"Creates a new Item in Bucketlist.\"\"\"\n+\n+    @token_auth.login_required\n+    def post(self, id):\n+        try:\n+\n+            create_item = reqparse.RequestParser()\n+            create_item.add_argument('name', type=str, required=True,\n+                                     location='json')\n+            create_item.add_argument('done', type=str, required=False,\n+                                     default='No', location='json')\n+            args = create_item.parse_args()\n+\n+            bucketlist = Bucketlist.query.\\\n+                filter_by(created_by=g.user.id, id=id).first()\n+\n+            # import ipdb; ipdb.set_trace()\n+\n+            if bucketlist:\n+\n+                item_query = \\\n+                    BucketListItem.query.filter_by(bucketlist_id=id).all()\n+                existing_items = [item.name for item in item_query]\n+\n+                if args.done.lower() == 'no' or args.done.lower() == 'yes':","path":"bapi/resources/bucketlist_items.py","position":35,"original_position":35,"commit_id":"5b091a1c7bba7c20cd0c563bfbac19ae219f7c7a","original_commit_id":"5b091a1c7bba7c20cd0c563bfbac19ae219f7c7a","user":{"login":"njirap","id":2056512,"avatar_url":"https://avatars.githubusercontent.com/u/2056512?v=3","gravatar_id":"","url":"https://api.github.com/users/njirap","html_url":"https://github.com/njirap","followers_url":"https://api.github.com/users/njirap/followers","following_url":"https://api.github.com/users/njirap/following{/other_user}","gists_url":"https://api.github.com/users/njirap/gists{/gist_id}","starred_url":"https://api.github.com/users/njirap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njirap/subscriptions","organizations_url":"https://api.github.com/users/njirap/orgs","repos_url":"https://api.github.com/users/njirap/repos","events_url":"https://api.github.com/users/njirap/events{/privacy}","received_events_url":"https://api.github.com/users/njirap/received_events","type":"User","site_admin":false},"body":"can be `if args.done.lower() in ['no', 'yes']`","created_at":"2016-12-20T12:17:38Z","updated_at":"2016-12-20T12:17:38Z","html_url":"https://github.com/Bopchy/bucketlist-api/pull/3#discussion_r93225973","pull_request_url":"https://api.github.com/repos/Bopchy/bucketlist-api/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/Bopchy/bucketlist-api/pulls/comments/93225973"},"html":{"href":"https://github.com/Bopchy/bucketlist-api/pull/3#discussion_r93225973"},"pull_request":{"href":"https://api.github.com/repos/Bopchy/bucketlist-api/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/Bopchy/bucketlist-api/pulls/3","id":97959587,"html_url":"https://github.com/Bopchy/bucketlist-api/pull/3","diff_url":"https://github.com/Bopchy/bucketlist-api/pull/3.diff","patch_url":"https://github.com/Bopchy/bucketlist-api/pull/3.patch","issue_url":"https://api.github.com/repos/Bopchy/bucketlist-api/issues/3","number":3,"state":"open","locked":false,"title":"4th Peer review ","user":{"login":"Bopchy","id":12303856,"avatar_url":"https://avatars.githubusercontent.com/u/12303856?v=3","gravatar_id":"","url":"https://api.github.com/users/Bopchy","html_url":"https://github.com/Bopchy","followers_url":"https://api.github.com/users/Bopchy/followers","following_url":"https://api.github.com/users/Bopchy/following{/other_user}","gists_url":"https://api.github.com/users/Bopchy/gists{/gist_id}","starred_url":"https://api.github.com/users/Bopchy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bopchy/subscriptions","organizations_url":"https://api.github.com/users/Bopchy/orgs","repos_url":"https://api.github.com/users/Bopchy/repos","events_url":"https://api.github.com/users/Bopchy/events{/privacy}","received_events_url":"https://api.github.com/users/Bopchy/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-12-14T14:14:47Z","updated_at":"2016-12-20T12:17:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"20921026472c7f49354e2a0bfc3fbbda9492ee90","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Bopchy/bucketlist-api/pulls/3/commits","review_comments_url":"https://api.github.com/repos/Bopchy/bucketlist-api/pulls/3/comments","review_comment_url":"https://api.github.com/repos/Bopchy/bucketlist-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Bopchy/bucketlist-api/issues/3/comments","statuses_url":"https://api.github.com/repos/Bopchy/bucketlist-api/statuses/5b091a1c7bba7c20cd0c563bfbac19ae219f7c7a","head":{"label":"Bopchy:develop","ref":"develop","sha":"5b091a1c7bba7c20cd0c563bfbac19ae219f7c7a","user":{"login":"Bopchy","id":12303856,"avatar_url":"https://avatars.githubusercontent.com/u/12303856?v=3","gravatar_id":"","url":"https://api.github.com/users/Bopchy","html_url":"https://github.com/Bopchy","followers_url":"https://api.github.com/users/Bopchy/followers","following_url":"https://api.github.com/users/Bopchy/following{/other_user}","gists_url":"https://api.github.com/users/Bopchy/gists{/gist_id}","starred_url":"https://api.github.com/users/Bopchy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bopchy/subscriptions","organizations_url":"https://api.github.com/users/Bopchy/orgs","repos_url":"https://api.github.com/users/Bopchy/repos","events_url":"https://api.github.com/users/Bopchy/events{/privacy}","received_events_url":"https://api.github.com/users/Bopchy/received_events","type":"User","site_admin":false},"repo":{"id":74029406,"name":"bucketlist-api","full_name":"Bopchy/bucketlist-api","owner":{"login":"Bopchy","id":12303856,"avatar_url":"https://avatars.githubusercontent.com/u/12303856?v=3","gravatar_id":"","url":"https://api.github.com/users/Bopchy","html_url":"https://github.com/Bopchy","followers_url":"https://api.github.com/users/Bopchy/followers","following_url":"https://api.github.com/users/Bopchy/following{/other_user}","gists_url":"https://api.github.com/users/Bopchy/gists{/gist_id}","starred_url":"https://api.github.com/users/Bopchy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bopchy/subscriptions","organizations_url":"https://api.github.com/users/Bopchy/orgs","repos_url":"https://api.github.com/users/Bopchy/repos","events_url":"https://api.github.com/users/Bopchy/events{/privacy}","received_events_url":"https://api.github.com/users/Bopchy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Bopchy/bucketlist-api","description":null,"fork":false,"url":"https://api.github.com/repos/Bopchy/bucketlist-api","forks_url":"https://api.github.com/repos/Bopchy/bucketlist-api/forks","keys_url":"https://api.github.com/repos/Bopchy/bucketlist-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Bopchy/bucketlist-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Bopchy/bucketlist-api/teams","hooks_url":"https://api.github.com/repos/Bopchy/bucketlist-api/hooks","issue_events_url":"https://api.github.com/repos/Bopchy/bucketlist-api/issues/events{/number}","events_url":"https://api.github.com/repos/Bopchy/bucketlist-api/events","assignees_url":"https://api.github.com/repos/Bopchy/bucketlist-api/assignees{/user}","branches_url":"https://api.github.com/repos/Bopchy/bucketlist-api/branches{/branch}","tags_url":"https://api.github.com/repos/Bopchy/bucketlist-api/tags","blobs_url":"https://api.github.com/repos/Bopchy/bucketlist-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Bopchy/bucketlist-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Bopchy/bucketlist-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/Bopchy/bucketlist-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Bopchy/bucketlist-api/statuses/{sha}","languages_url":"https://api.github.com/repos/Bopchy/bucketlist-api/languages","stargazers_url":"https://api.github.com/repos/Bopchy/bucketlist-api/stargazers","contributors_url":"https://api.github.com/repos/Bopchy/bucketlist-api/contributors","subscribers_url":"https://api.github.com/repos/Bopchy/bucketlist-api/subscribers","subscription_url":"https://api.github.com/repos/Bopchy/bucketlist-api/subscription","commits_url":"https://api.github.com/repos/Bopchy/bucketlist-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/Bopchy/bucketlist-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/Bopchy/bucketlist-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/Bopchy/bucketlist-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/Bopchy/bucketlist-api/contents/{+path}","compare_url":"https://api.github.com/repos/Bopchy/bucketlist-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Bopchy/bucketlist-api/merges","archive_url":"https://api.github.com/repos/Bopchy/bucketlist-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Bopchy/bucketlist-api/downloads","issues_url":"https://api.github.com/repos/Bopchy/bucketlist-api/issues{/number}","pulls_url":"https://api.github.com/repos/Bopchy/bucketlist-api/pulls{/number}","milestones_url":"https://api.github.com/repos/Bopchy/bucketlist-api/milestones{/number}","notifications_url":"https://api.github.com/repos/Bopchy/bucketlist-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Bopchy/bucketlist-api/labels{/name}","releases_url":"https://api.github.com/repos/Bopchy/bucketlist-api/releases{/id}","deployments_url":"https://api.github.com/repos/Bopchy/bucketlist-api/deployments","created_at":"2016-11-17T13:27:52Z","updated_at":"2016-11-17T13:27:52Z","pushed_at":"2016-12-20T11:52:58Z","git_url":"git://github.com/Bopchy/bucketlist-api.git","ssh_url":"git@github.com:Bopchy/bucketlist-api.git","clone_url":"https://github.com/Bopchy/bucketlist-api.git","svn_url":"https://github.com/Bopchy/bucketlist-api","homepage":null,"size":70,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"Bopchy:master","ref":"master","sha":"13cf178673f2f600df89859d84235e0662aff57b","user":{"login":"Bopchy","id":12303856,"avatar_url":"https://avatars.githubusercontent.com/u/12303856?v=3","gravatar_id":"","url":"https://api.github.com/users/Bopchy","html_url":"https://github.com/Bopchy","followers_url":"https://api.github.com/users/Bopchy/followers","following_url":"https://api.github.com/users/Bopchy/following{/other_user}","gists_url":"https://api.github.com/users/Bopchy/gists{/gist_id}","starred_url":"https://api.github.com/users/Bopchy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bopchy/subscriptions","organizations_url":"https://api.github.com/users/Bopchy/orgs","repos_url":"https://api.github.com/users/Bopchy/repos","events_url":"https://api.github.com/users/Bopchy/events{/privacy}","received_events_url":"https://api.github.com/users/Bopchy/received_events","type":"User","site_admin":false},"repo":{"id":74029406,"name":"bucketlist-api","full_name":"Bopchy/bucketlist-api","owner":{"login":"Bopchy","id":12303856,"avatar_url":"https://avatars.githubusercontent.com/u/12303856?v=3","gravatar_id":"","url":"https://api.github.com/users/Bopchy","html_url":"https://github.com/Bopchy","followers_url":"https://api.github.com/users/Bopchy/followers","following_url":"https://api.github.com/users/Bopchy/following{/other_user}","gists_url":"https://api.github.com/users/Bopchy/gists{/gist_id}","starred_url":"https://api.github.com/users/Bopchy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bopchy/subscriptions","organizations_url":"https://api.github.com/users/Bopchy/orgs","repos_url":"https://api.github.com/users/Bopchy/repos","events_url":"https://api.github.com/users/Bopchy/events{/privacy}","received_events_url":"https://api.github.com/users/Bopchy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Bopchy/bucketlist-api","description":null,"fork":false,"url":"https://api.github.com/repos/Bopchy/bucketlist-api","forks_url":"https://api.github.com/repos/Bopchy/bucketlist-api/forks","keys_url":"https://api.github.com/repos/Bopchy/bucketlist-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Bopchy/bucketlist-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Bopchy/bucketlist-api/teams","hooks_url":"https://api.github.com/repos/Bopchy/bucketlist-api/hooks","issue_events_url":"https://api.github.com/repos/Bopchy/bucketlist-api/issues/events{/number}","events_url":"https://api.github.com/repos/Bopchy/bucketlist-api/events","assignees_url":"https://api.github.com/repos/Bopchy/bucketlist-api/assignees{/user}","branches_url":"https://api.github.com/repos/Bopchy/bucketlist-api/branches{/branch}","tags_url":"https://api.github.com/repos/Bopchy/bucketlist-api/tags","blobs_url":"https://api.github.com/repos/Bopchy/bucketlist-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Bopchy/bucketlist-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Bopchy/bucketlist-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/Bopchy/bucketlist-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Bopchy/bucketlist-api/statuses/{sha}","languages_url":"https://api.github.com/repos/Bopchy/bucketlist-api/languages","stargazers_url":"https://api.github.com/repos/Bopchy/bucketlist-api/stargazers","contributors_url":"https://api.github.com/repos/Bopchy/bucketlist-api/contributors","subscribers_url":"https://api.github.com/repos/Bopchy/bucketlist-api/subscribers","subscription_url":"https://api.github.com/repos/Bopchy/bucketlist-api/subscription","commits_url":"https://api.github.com/repos/Bopchy/bucketlist-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/Bopchy/bucketlist-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/Bopchy/bucketlist-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/Bopchy/bucketlist-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/Bopchy/bucketlist-api/contents/{+path}","compare_url":"https://api.github.com/repos/Bopchy/bucketlist-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Bopchy/bucketlist-api/merges","archive_url":"https://api.github.com/repos/Bopchy/bucketlist-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Bopchy/bucketlist-api/downloads","issues_url":"https://api.github.com/repos/Bopchy/bucketlist-api/issues{/number}","pulls_url":"https://api.github.com/repos/Bopchy/bucketlist-api/pulls{/number}","milestones_url":"https://api.github.com/repos/Bopchy/bucketlist-api/milestones{/number}","notifications_url":"https://api.github.com/repos/Bopchy/bucketlist-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Bopchy/bucketlist-api/labels{/name}","releases_url":"https://api.github.com/repos/Bopchy/bucketlist-api/releases{/id}","deployments_url":"https://api.github.com/repos/Bopchy/bucketlist-api/deployments","created_at":"2016-11-17T13:27:52Z","updated_at":"2016-11-17T13:27:52Z","pushed_at":"2016-12-20T11:52:58Z","git_url":"git://github.com/Bopchy/bucketlist-api.git","ssh_url":"git@github.com:Bopchy/bucketlist-api.git","clone_url":"https://github.com/Bopchy/bucketlist-api.git","svn_url":"https://github.com/Bopchy/bucketlist-api","homepage":null,"size":70,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Bopchy/bucketlist-api/pulls/3"},"html":{"href":"https://github.com/Bopchy/bucketlist-api/pull/3"},"issue":{"href":"https://api.github.com/repos/Bopchy/bucketlist-api/issues/3"},"comments":{"href":"https://api.github.com/repos/Bopchy/bucketlist-api/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/Bopchy/bucketlist-api/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/Bopchy/bucketlist-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Bopchy/bucketlist-api/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/Bopchy/bucketlist-api/statuses/5b091a1c7bba7c20cd0c563bfbac19ae219f7c7a"}}}}
{"actor":{"display_login":"njirap"}}