{"action":"created","comment":{"url":"https://api.github.com/repos/GFUCABAM/statler/pulls/comments/44501009","id":44501009,"diff_hunk":"@@ -13,20 +15,19 @@ def healthCheck(request):\n     return HttpResponse(\"The API is alive.\")\n \n \n-def getPlayList(request):\n+def getPlayList(request, play_list_id):\n     \"\"\"called when a GET request is sent to /api/play-list/\n     returns json of the list of plays\n     see https://docs.djangoproject.com/en/1.8/topics/serialization/\"\"\"\n-    #TODO: get an actual PlayList object instead of all plays\n \n-    aPlayDictList = [vars(Play(x)) for x in PlayDAO.objects.all()]\n+    aPlayEntryList = PlayList(get_object_or_404(PlayListDAO, url_title=play_list_id)).entries\n \n-    # Remove reviews from each play dict, because we aren't going\n-    # that deep in the object graph\n-    for aPlayDict in aPlayDictList:\n-        del aPlayDict[\"reviews\"]\n-        \n-    return HttpResponse(json.dumps(aPlayDictList))\n+    aPlayEntryList = [vars(x) for x in aPlayEntryList]\n+    for aPlayEntry in aPlayEntryList:\n+        aPlayEntry[\"play\"] = vars(aPlayEntry[\"play\"])\n+        del aPlayEntry[\"play\"][\"reviews\"]","path":"statler_api/views.py","position":32,"original_position":32,"commit_id":"7d40f7bf8e17f5919fe2834778ff5d47a58d1cc1","original_commit_id":"7d40f7bf8e17f5919fe2834778ff5d47a58d1cc1","user":{"login":"chaneberg","id":12008786,"avatar_url":"https://avatars.githubusercontent.com/u/12008786?v=3","gravatar_id":"","url":"https://api.github.com/users/chaneberg","html_url":"https://github.com/chaneberg","followers_url":"https://api.github.com/users/chaneberg/followers","following_url":"https://api.github.com/users/chaneberg/following{/other_user}","gists_url":"https://api.github.com/users/chaneberg/gists{/gist_id}","starred_url":"https://api.github.com/users/chaneberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chaneberg/subscriptions","organizations_url":"https://api.github.com/users/chaneberg/orgs","repos_url":"https://api.github.com/users/chaneberg/repos","events_url":"https://api.github.com/users/chaneberg/events{/privacy}","received_events_url":"https://api.github.com/users/chaneberg/received_events","type":"User","site_admin":false},"body":"@B3nD3lan3y, this is a fixed play list endpoint. The serialization is messy and will be moved into the classes by you. But the pattern of using vars() recursively might actually be useful","created_at":"2015-11-11T04:37:32Z","updated_at":"2015-11-11T04:37:32Z","html_url":"https://github.com/GFUCABAM/statler/pull/102#discussion_r44501009","pull_request_url":"https://api.github.com/repos/GFUCABAM/statler/pulls/102","_links":{"self":{"href":"https://api.github.com/repos/GFUCABAM/statler/pulls/comments/44501009"},"html":{"href":"https://github.com/GFUCABAM/statler/pull/102#discussion_r44501009"},"pull_request":{"href":"https://api.github.com/repos/GFUCABAM/statler/pulls/102"}}},"pull_request":{"url":"https://api.github.com/repos/GFUCABAM/statler/pulls/102","id":50347099,"html_url":"https://github.com/GFUCABAM/statler/pull/102","diff_url":"https://github.com/GFUCABAM/statler/pull/102.diff","patch_url":"https://github.com/GFUCABAM/statler/pull/102.patch","issue_url":"https://api.github.com/repos/GFUCABAM/statler/issues/102","number":102,"state":"open","locked":false,"title":"Post endpoint using JSON, and real play lists","user":{"login":"chaneberg","id":12008786,"avatar_url":"https://avatars.githubusercontent.com/u/12008786?v=3","gravatar_id":"","url":"https://api.github.com/users/chaneberg","html_url":"https://github.com/chaneberg","followers_url":"https://api.github.com/users/chaneberg/followers","following_url":"https://api.github.com/users/chaneberg/following{/other_user}","gists_url":"https://api.github.com/users/chaneberg/gists{/gist_id}","starred_url":"https://api.github.com/users/chaneberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chaneberg/subscriptions","organizations_url":"https://api.github.com/users/chaneberg/orgs","repos_url":"https://api.github.com/users/chaneberg/repos","events_url":"https://api.github.com/users/chaneberg/events{/privacy}","received_events_url":"https://api.github.com/users/chaneberg/received_events","type":"User","site_admin":false},"body":"Made play list GET endpoint return specific play lists. Added POST endpoint. Added very basic and ugly post box in order to test the POST endpoint. Improved Admin site.\r\n\r\nMade POST endpoint use JSON, and updated client code to send it JSON. Made play lists be returned in correct format according to spec.","created_at":"2015-11-11T04:29:50Z","updated_at":"2015-11-11T04:37:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ca8621b2b891f53ce5520d814e494d5548fb6784","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/GFUCABAM/statler/pulls/102/commits","review_comments_url":"https://api.github.com/repos/GFUCABAM/statler/pulls/102/comments","review_comment_url":"https://api.github.com/repos/GFUCABAM/statler/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GFUCABAM/statler/issues/102/comments","statuses_url":"https://api.github.com/repos/GFUCABAM/statler/statuses/7d40f7bf8e17f5919fe2834778ff5d47a58d1cc1","head":{"label":"GFUCABAM:charles","ref":"charles","sha":"7d40f7bf8e17f5919fe2834778ff5d47a58d1cc1","user":{"login":"GFUCABAM","id":14143032,"avatar_url":"https://avatars.githubusercontent.com/u/14143032?v=3","gravatar_id":"","url":"https://api.github.com/users/GFUCABAM","html_url":"https://github.com/GFUCABAM","followers_url":"https://api.github.com/users/GFUCABAM/followers","following_url":"https://api.github.com/users/GFUCABAM/following{/other_user}","gists_url":"https://api.github.com/users/GFUCABAM/gists{/gist_id}","starred_url":"https://api.github.com/users/GFUCABAM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GFUCABAM/subscriptions","organizations_url":"https://api.github.com/users/GFUCABAM/orgs","repos_url":"https://api.github.com/users/GFUCABAM/repos","events_url":"https://api.github.com/users/GFUCABAM/events{/privacy}","received_events_url":"https://api.github.com/users/GFUCABAM/received_events","type":"Organization","site_admin":false},"repo":{"id":42279414,"name":"statler","full_name":"GFUCABAM/statler","owner":{"login":"GFUCABAM","id":14143032,"avatar_url":"https://avatars.githubusercontent.com/u/14143032?v=3","gravatar_id":"","url":"https://api.github.com/users/GFUCABAM","html_url":"https://github.com/GFUCABAM","followers_url":"https://api.github.com/users/GFUCABAM/followers","following_url":"https://api.github.com/users/GFUCABAM/following{/other_user}","gists_url":"https://api.github.com/users/GFUCABAM/gists{/gist_id}","starred_url":"https://api.github.com/users/GFUCABAM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GFUCABAM/subscriptions","organizations_url":"https://api.github.com/users/GFUCABAM/orgs","repos_url":"https://api.github.com/users/GFUCABAM/repos","events_url":"https://api.github.com/users/GFUCABAM/events{/privacy}","received_events_url":"https://api.github.com/users/GFUCABAM/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GFUCABAM/statler","description":"The beginnings of awesome","fork":false,"url":"https://api.github.com/repos/GFUCABAM/statler","forks_url":"https://api.github.com/repos/GFUCABAM/statler/forks","keys_url":"https://api.github.com/repos/GFUCABAM/statler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GFUCABAM/statler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GFUCABAM/statler/teams","hooks_url":"https://api.github.com/repos/GFUCABAM/statler/hooks","issue_events_url":"https://api.github.com/repos/GFUCABAM/statler/issues/events{/number}","events_url":"https://api.github.com/repos/GFUCABAM/statler/events","assignees_url":"https://api.github.com/repos/GFUCABAM/statler/assignees{/user}","branches_url":"https://api.github.com/repos/GFUCABAM/statler/branches{/branch}","tags_url":"https://api.github.com/repos/GFUCABAM/statler/tags","blobs_url":"https://api.github.com/repos/GFUCABAM/statler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GFUCABAM/statler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GFUCABAM/statler/git/refs{/sha}","trees_url":"https://api.github.com/repos/GFUCABAM/statler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GFUCABAM/statler/statuses/{sha}","languages_url":"https://api.github.com/repos/GFUCABAM/statler/languages","stargazers_url":"https://api.github.com/repos/GFUCABAM/statler/stargazers","contributors_url":"https://api.github.com/repos/GFUCABAM/statler/contributors","subscribers_url":"https://api.github.com/repos/GFUCABAM/statler/subscribers","subscription_url":"https://api.github.com/repos/GFUCABAM/statler/subscription","commits_url":"https://api.github.com/repos/GFUCABAM/statler/commits{/sha}","git_commits_url":"https://api.github.com/repos/GFUCABAM/statler/git/commits{/sha}","comments_url":"https://api.github.com/repos/GFUCABAM/statler/comments{/number}","issue_comment_url":"https://api.github.com/repos/GFUCABAM/statler/issues/comments{/number}","contents_url":"https://api.github.com/repos/GFUCABAM/statler/contents/{+path}","compare_url":"https://api.github.com/repos/GFUCABAM/statler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GFUCABAM/statler/merges","archive_url":"https://api.github.com/repos/GFUCABAM/statler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GFUCABAM/statler/downloads","issues_url":"https://api.github.com/repos/GFUCABAM/statler/issues{/number}","pulls_url":"https://api.github.com/repos/GFUCABAM/statler/pulls{/number}","milestones_url":"https://api.github.com/repos/GFUCABAM/statler/milestones{/number}","notifications_url":"https://api.github.com/repos/GFUCABAM/statler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GFUCABAM/statler/labels{/name}","releases_url":"https://api.github.com/repos/GFUCABAM/statler/releases{/id}","created_at":"2015-09-11T01:09:53Z","updated_at":"2015-10-23T03:54:51Z","pushed_at":"2015-11-11T04:29:51Z","git_url":"git://github.com/GFUCABAM/statler.git","ssh_url":"git@github.com:GFUCABAM/statler.git","clone_url":"https://github.com/GFUCABAM/statler.git","svn_url":"https://github.com/GFUCABAM/statler","homepage":"http://tententenreviews.com","size":1852,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":23,"forks":0,"open_issues":23,"watchers":0,"default_branch":"dev"}},"base":{"label":"GFUCABAM:dev","ref":"dev","sha":"835c20de00f0f42b5d1e8916ee862bf0c00e700b","user":{"login":"GFUCABAM","id":14143032,"avatar_url":"https://avatars.githubusercontent.com/u/14143032?v=3","gravatar_id":"","url":"https://api.github.com/users/GFUCABAM","html_url":"https://github.com/GFUCABAM","followers_url":"https://api.github.com/users/GFUCABAM/followers","following_url":"https://api.github.com/users/GFUCABAM/following{/other_user}","gists_url":"https://api.github.com/users/GFUCABAM/gists{/gist_id}","starred_url":"https://api.github.com/users/GFUCABAM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GFUCABAM/subscriptions","organizations_url":"https://api.github.com/users/GFUCABAM/orgs","repos_url":"https://api.github.com/users/GFUCABAM/repos","events_url":"https://api.github.com/users/GFUCABAM/events{/privacy}","received_events_url":"https://api.github.com/users/GFUCABAM/received_events","type":"Organization","site_admin":false},"repo":{"id":42279414,"name":"statler","full_name":"GFUCABAM/statler","owner":{"login":"GFUCABAM","id":14143032,"avatar_url":"https://avatars.githubusercontent.com/u/14143032?v=3","gravatar_id":"","url":"https://api.github.com/users/GFUCABAM","html_url":"https://github.com/GFUCABAM","followers_url":"https://api.github.com/users/GFUCABAM/followers","following_url":"https://api.github.com/users/GFUCABAM/following{/other_user}","gists_url":"https://api.github.com/users/GFUCABAM/gists{/gist_id}","starred_url":"https://api.github.com/users/GFUCABAM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GFUCABAM/subscriptions","organizations_url":"https://api.github.com/users/GFUCABAM/orgs","repos_url":"https://api.github.com/users/GFUCABAM/repos","events_url":"https://api.github.com/users/GFUCABAM/events{/privacy}","received_events_url":"https://api.github.com/users/GFUCABAM/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GFUCABAM/statler","description":"The beginnings of awesome","fork":false,"url":"https://api.github.com/repos/GFUCABAM/statler","forks_url":"https://api.github.com/repos/GFUCABAM/statler/forks","keys_url":"https://api.github.com/repos/GFUCABAM/statler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GFUCABAM/statler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GFUCABAM/statler/teams","hooks_url":"https://api.github.com/repos/GFUCABAM/statler/hooks","issue_events_url":"https://api.github.com/repos/GFUCABAM/statler/issues/events{/number}","events_url":"https://api.github.com/repos/GFUCABAM/statler/events","assignees_url":"https://api.github.com/repos/GFUCABAM/statler/assignees{/user}","branches_url":"https://api.github.com/repos/GFUCABAM/statler/branches{/branch}","tags_url":"https://api.github.com/repos/GFUCABAM/statler/tags","blobs_url":"https://api.github.com/repos/GFUCABAM/statler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GFUCABAM/statler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GFUCABAM/statler/git/refs{/sha}","trees_url":"https://api.github.com/repos/GFUCABAM/statler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GFUCABAM/statler/statuses/{sha}","languages_url":"https://api.github.com/repos/GFUCABAM/statler/languages","stargazers_url":"https://api.github.com/repos/GFUCABAM/statler/stargazers","contributors_url":"https://api.github.com/repos/GFUCABAM/statler/contributors","subscribers_url":"https://api.github.com/repos/GFUCABAM/statler/subscribers","subscription_url":"https://api.github.com/repos/GFUCABAM/statler/subscription","commits_url":"https://api.github.com/repos/GFUCABAM/statler/commits{/sha}","git_commits_url":"https://api.github.com/repos/GFUCABAM/statler/git/commits{/sha}","comments_url":"https://api.github.com/repos/GFUCABAM/statler/comments{/number}","issue_comment_url":"https://api.github.com/repos/GFUCABAM/statler/issues/comments{/number}","contents_url":"https://api.github.com/repos/GFUCABAM/statler/contents/{+path}","compare_url":"https://api.github.com/repos/GFUCABAM/statler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GFUCABAM/statler/merges","archive_url":"https://api.github.com/repos/GFUCABAM/statler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GFUCABAM/statler/downloads","issues_url":"https://api.github.com/repos/GFUCABAM/statler/issues{/number}","pulls_url":"https://api.github.com/repos/GFUCABAM/statler/pulls{/number}","milestones_url":"https://api.github.com/repos/GFUCABAM/statler/milestones{/number}","notifications_url":"https://api.github.com/repos/GFUCABAM/statler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GFUCABAM/statler/labels{/name}","releases_url":"https://api.github.com/repos/GFUCABAM/statler/releases{/id}","created_at":"2015-09-11T01:09:53Z","updated_at":"2015-10-23T03:54:51Z","pushed_at":"2015-11-11T04:29:51Z","git_url":"git://github.com/GFUCABAM/statler.git","ssh_url":"git@github.com:GFUCABAM/statler.git","clone_url":"https://github.com/GFUCABAM/statler.git","svn_url":"https://github.com/GFUCABAM/statler","homepage":"http://tententenreviews.com","size":1852,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":23,"forks":0,"open_issues":23,"watchers":0,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/GFUCABAM/statler/pulls/102"},"html":{"href":"https://github.com/GFUCABAM/statler/pull/102"},"issue":{"href":"https://api.github.com/repos/GFUCABAM/statler/issues/102"},"comments":{"href":"https://api.github.com/repos/GFUCABAM/statler/issues/102/comments"},"review_comments":{"href":"https://api.github.com/repos/GFUCABAM/statler/pulls/102/comments"},"review_comment":{"href":"https://api.github.com/repos/GFUCABAM/statler/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GFUCABAM/statler/pulls/102/commits"},"statuses":{"href":"https://api.github.com/repos/GFUCABAM/statler/statuses/7d40f7bf8e17f5919fe2834778ff5d47a58d1cc1"}}}}