{"action":"created","comment":{"url":"https://api.github.com/repos/fossasia/open-event-orga-server/pulls/comments/65053385","id":65053385,"diff_hunk":"@@ -25,6 +23,17 @@\n     'results': fields.List(fields.Nested(TRACK))\n })\n \n+TRACK_POST = api.clone('TrackPost', TRACK)\n+del TRACK_POST['id']\n+del TRACK_POST['sessions']\n+\n+\n+# Create DAO\n+class TrackDAO(ServiceDAO):","path":"open_event/api/tracks.py","position":23,"original_position":23,"commit_id":"d5dd25bcc0c0b1b5e04ac2f2af423c9db5ee42da","original_commit_id":"d5dd25bcc0c0b1b5e04ac2f2af423c9db5ee42da","user":{"login":"juslee","id":1696598,"avatar_url":"https://avatars.githubusercontent.com/u/1696598?v=3","gravatar_id":"","url":"https://api.github.com/users/juslee","html_url":"https://github.com/juslee","followers_url":"https://api.github.com/users/juslee/followers","following_url":"https://api.github.com/users/juslee/following{/other_user}","gists_url":"https://api.github.com/users/juslee/gists{/gist_id}","starred_url":"https://api.github.com/users/juslee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juslee/subscriptions","organizations_url":"https://api.github.com/users/juslee/orgs","repos_url":"https://api.github.com/users/juslee/repos","events_url":"https://api.github.com/users/juslee/events{/privacy}","received_events_url":"https://api.github.com/users/juslee/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/assets/images/favicon.png) Issue found: [Too few public methods (0/2)](https://www.codacy.com/app/triplez/open-event-orga-server/file/2653967400/issues/source?bid=3233864&fileBranchId=3324785#l32)","created_at":"2016-05-30T10:26:19Z","updated_at":"2016-05-30T10:26:19Z","html_url":"https://github.com/fossasia/open-event-orga-server/pull/459#discussion_r65053385","pull_request_url":"https://api.github.com/repos/fossasia/open-event-orga-server/pulls/459","_links":{"self":{"href":"https://api.github.com/repos/fossasia/open-event-orga-server/pulls/comments/65053385"},"html":{"href":"https://github.com/fossasia/open-event-orga-server/pull/459#discussion_r65053385"},"pull_request":{"href":"https://api.github.com/repos/fossasia/open-event-orga-server/pulls/459"}}},"pull_request":{"url":"https://api.github.com/repos/fossasia/open-event-orga-server/pulls/459","id":71828054,"html_url":"https://github.com/fossasia/open-event-orga-server/pull/459","diff_url":"https://github.com/fossasia/open-event-orga-server/pull/459.diff","patch_url":"https://github.com/fossasia/open-event-orga-server/pull/459.patch","issue_url":"https://api.github.com/repos/fossasia/open-event-orga-server/issues/459","number":459,"state":"open","locked":false,"title":"POST API","user":{"login":"aviaryan","id":4047597,"avatar_url":"https://avatars.githubusercontent.com/u/4047597?v=3","gravatar_id":"","url":"https://api.github.com/users/aviaryan","html_url":"https://github.com/aviaryan","followers_url":"https://api.github.com/users/aviaryan/followers","following_url":"https://api.github.com/users/aviaryan/following{/other_user}","gists_url":"https://api.github.com/users/aviaryan/gists{/gist_id}","starred_url":"https://api.github.com/users/aviaryan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aviaryan/subscriptions","organizations_url":"https://api.github.com/users/aviaryan/orgs","repos_url":"https://api.github.com/users/aviaryan/repos","events_url":"https://api.github.com/users/aviaryan/events{/privacy}","received_events_url":"https://api.github.com/users/aviaryan/received_events","type":"User","site_admin":false},"body":"Fixes #442 and #462\r\nIncludes PR #456 \r\n\r\nCurrently no ACL has been implemented in this patch although login is required to be able to update data on server. Using Python requests - \r\n```python\r\nfrom requests import post \r\nurl = 'http://localhost:5000/api/v2/events'\r\nprint post(url + '/1/formats', json={'label_en': 'eng', 'name': 'eng'}, auth=('username', 'password')).json()\r\n```\r\nIn swagger UI, you need to be signed in to open event before you can make POST requests. :sunglasses: \r\n\r\n#### A question\r\n\r\n@juslee @leto @shivamMg \r\n\r\nFor POST request to create a new session, I am representing related models only by their ids. like `level_id` instead of full level object (below)\r\n```json\r\n\"level\": {\r\n    \"id\": 1,\r\n    \"label_en\": \"string\"\r\n  },\r\n```\r\n\r\nThe current schema to send a POST req to create session is as follows. As you can see, I am using `level_id`, `track_id` and so..\r\n```json\r\n{\r\n  \"abstract\": \"string\",\r\n  \"description\": \"string\",\r\n  \"end_time\": \"2016-05-29T12:44:03.743Z\",\r\n  \"language_id\": 0,\r\n  \"level_id\": 0,\r\n  \"microlocation_id\": 0,\r\n  \"speakers\": [\r\n    {\r\n       \"id\": 0,\r\n       \"name\": \"string\"\r\n    }\r\n  ],\r\n  \"start_time\": \"2016-05-29T12:44:03.743Z\",\r\n  \"subtitle\": \"string\",\r\n  \"title\": \"string\",\r\n  \"track_id\": 0\r\n}\r\n```\r\n\r\nIs using IDs better since when creating a session, if you want to attach a level, you need to have the id of level before hand ?\r\nShould I change `speakers` to `speaker_ids`, a list of speaker id's ?\r\n\r\n**UPDATE** - I have changed `speakers` to `speaker_ids` now. ","created_at":"2016-05-29T14:03:18Z","updated_at":"2016-05-30T10:26:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"44faf21c93c3dd76d53673a74caac2607a6cdc03","assignee":{"login":"aviaryan","id":4047597,"avatar_url":"https://avatars.githubusercontent.com/u/4047597?v=3","gravatar_id":"","url":"https://api.github.com/users/aviaryan","html_url":"https://github.com/aviaryan","followers_url":"https://api.github.com/users/aviaryan/followers","following_url":"https://api.github.com/users/aviaryan/following{/other_user}","gists_url":"https://api.github.com/users/aviaryan/gists{/gist_id}","starred_url":"https://api.github.com/users/aviaryan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aviaryan/subscriptions","organizations_url":"https://api.github.com/users/aviaryan/orgs","repos_url":"https://api.github.com/users/aviaryan/repos","events_url":"https://api.github.com/users/aviaryan/events{/privacy}","received_events_url":"https://api.github.com/users/aviaryan/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/fossasia/open-event-orga-server/milestones/8","html_url":"https://github.com/fossasia/open-event-orga-server/milestones/GSOC%202016:%20Milestone%203","labels_url":"https://api.github.com/repos/fossasia/open-event-orga-server/milestones/8/labels","id":1762353,"number":8,"title":"GSOC 2016: Milestone 3","description":"GSOC 2016 Milestone 3 - All issues to be completed by 5th June 2016.\r\n\r\nInstructions: \r\n1. Create issues to work on.\r\n2. Assign the issue to the milestone.\r\n3. Assign the issue to a user.\r\n\r\nCompleted Milestone:\r\n1. Create a blog post describing what has been done.\r\n2. Tag a release.\r\n3. Deploy on a server.","creator":{"login":"juslee","id":1696598,"avatar_url":"https://avatars.githubusercontent.com/u/1696598?v=3","gravatar_id":"","url":"https://api.github.com/users/juslee","html_url":"https://github.com/juslee","followers_url":"https://api.github.com/users/juslee/followers","following_url":"https://api.github.com/users/juslee/following{/other_user}","gists_url":"https://api.github.com/users/juslee/gists{/gist_id}","starred_url":"https://api.github.com/users/juslee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juslee/subscriptions","organizations_url":"https://api.github.com/users/juslee/orgs","repos_url":"https://api.github.com/users/juslee/repos","events_url":"https://api.github.com/users/juslee/events{/privacy}","received_events_url":"https://api.github.com/users/juslee/received_events","type":"User","site_admin":false},"open_issues":28,"closed_issues":7,"state":"open","created_at":"2016-05-12T13:04:10Z","updated_at":"2016-05-30T09:25:02Z","due_on":"2016-06-04T22:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/fossasia/open-event-orga-server/pulls/459/commits","review_comments_url":"https://api.github.com/repos/fossasia/open-event-orga-server/pulls/459/comments","review_comment_url":"https://api.github.com/repos/fossasia/open-event-orga-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fossasia/open-event-orga-server/issues/459/comments","statuses_url":"https://api.github.com/repos/fossasia/open-event-orga-server/statuses/d5dd25bcc0c0b1b5e04ac2f2af423c9db5ee42da","head":{"label":"aviaryan:post-api","ref":"post-api","sha":"d5dd25bcc0c0b1b5e04ac2f2af423c9db5ee42da","user":{"login":"aviaryan","id":4047597,"avatar_url":"https://avatars.githubusercontent.com/u/4047597?v=3","gravatar_id":"","url":"https://api.github.com/users/aviaryan","html_url":"https://github.com/aviaryan","followers_url":"https://api.github.com/users/aviaryan/followers","following_url":"https://api.github.com/users/aviaryan/following{/other_user}","gists_url":"https://api.github.com/users/aviaryan/gists{/gist_id}","starred_url":"https://api.github.com/users/aviaryan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aviaryan/subscriptions","organizations_url":"https://api.github.com/users/aviaryan/orgs","repos_url":"https://api.github.com/users/aviaryan/repos","events_url":"https://api.github.com/users/aviaryan/events{/privacy}","received_events_url":"https://api.github.com/users/aviaryan/received_events","type":"User","site_admin":false},"repo":{"id":54204334,"name":"open-event-orga-server","full_name":"aviaryan/open-event-orga-server","owner":{"login":"aviaryan","id":4047597,"avatar_url":"https://avatars.githubusercontent.com/u/4047597?v=3","gravatar_id":"","url":"https://api.github.com/users/aviaryan","html_url":"https://github.com/aviaryan","followers_url":"https://api.github.com/users/aviaryan/followers","following_url":"https://api.github.com/users/aviaryan/following{/other_user}","gists_url":"https://api.github.com/users/aviaryan/gists{/gist_id}","starred_url":"https://api.github.com/users/aviaryan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aviaryan/subscriptions","organizations_url":"https://api.github.com/users/aviaryan/orgs","repos_url":"https://api.github.com/users/aviaryan/repos","events_url":"https://api.github.com/users/aviaryan/events{/privacy}","received_events_url":"https://api.github.com/users/aviaryan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aviaryan/open-event-orga-server","description":"Open Event Orga Server","fork":true,"url":"https://api.github.com/repos/aviaryan/open-event-orga-server","forks_url":"https://api.github.com/repos/aviaryan/open-event-orga-server/forks","keys_url":"https://api.github.com/repos/aviaryan/open-event-orga-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aviaryan/open-event-orga-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aviaryan/open-event-orga-server/teams","hooks_url":"https://api.github.com/repos/aviaryan/open-event-orga-server/hooks","issue_events_url":"https://api.github.com/repos/aviaryan/open-event-orga-server/issues/events{/number}","events_url":"https://api.github.com/repos/aviaryan/open-event-orga-server/events","assignees_url":"https://api.github.com/repos/aviaryan/open-event-orga-server/assignees{/user}","branches_url":"https://api.github.com/repos/aviaryan/open-event-orga-server/branches{/branch}","tags_url":"https://api.github.com/repos/aviaryan/open-event-orga-server/tags","blobs_url":"https://api.github.com/repos/aviaryan/open-event-orga-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aviaryan/open-event-orga-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aviaryan/open-event-orga-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/aviaryan/open-event-orga-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aviaryan/open-event-orga-server/statuses/{sha}","languages_url":"https://api.github.com/repos/aviaryan/open-event-orga-server/languages","stargazers_url":"https://api.github.com/repos/aviaryan/open-event-orga-server/stargazers","contributors_url":"https://api.github.com/repos/aviaryan/open-event-orga-server/contributors","subscribers_url":"https://api.github.com/repos/aviaryan/open-event-orga-server/subscribers","subscription_url":"https://api.github.com/repos/aviaryan/open-event-orga-server/subscription","commits_url":"https://api.github.com/repos/aviaryan/open-event-orga-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/aviaryan/open-event-orga-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/aviaryan/open-event-orga-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/aviaryan/open-event-orga-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/aviaryan/open-event-orga-server/contents/{+path}","compare_url":"https://api.github.com/repos/aviaryan/open-event-orga-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aviaryan/open-event-orga-server/merges","archive_url":"https://api.github.com/repos/aviaryan/open-event-orga-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aviaryan/open-event-orga-server/downloads","issues_url":"https://api.github.com/repos/aviaryan/open-event-orga-server/issues{/number}","pulls_url":"https://api.github.com/repos/aviaryan/open-event-orga-server/pulls{/number}","milestones_url":"https://api.github.com/repos/aviaryan/open-event-orga-server/milestones{/number}","notifications_url":"https://api.github.com/repos/aviaryan/open-event-orga-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aviaryan/open-event-orga-server/labels{/name}","releases_url":"https://api.github.com/repos/aviaryan/open-event-orga-server/releases{/id}","deployments_url":"https://api.github.com/repos/aviaryan/open-event-orga-server/deployments","created_at":"2016-03-18T13:46:21Z","updated_at":"2016-05-27T07:29:09Z","pushed_at":"2016-05-30T10:23:40Z","git_url":"git://github.com/aviaryan/open-event-orga-server.git","ssh_url":"git@github.com:aviaryan/open-event-orga-server.git","clone_url":"https://github.com/aviaryan/open-event-orga-server.git","svn_url":"https://github.com/aviaryan/open-event-orga-server","homepage":null,"size":1695,"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":"fossasia:master","ref":"master","sha":"b30b444b5afece8a83bd1d62feb4a06ec541be48","user":{"login":"fossasia","id":6295529,"avatar_url":"https://avatars.githubusercontent.com/u/6295529?v=3","gravatar_id":"","url":"https://api.github.com/users/fossasia","html_url":"https://github.com/fossasia","followers_url":"https://api.github.com/users/fossasia/followers","following_url":"https://api.github.com/users/fossasia/following{/other_user}","gists_url":"https://api.github.com/users/fossasia/gists{/gist_id}","starred_url":"https://api.github.com/users/fossasia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fossasia/subscriptions","organizations_url":"https://api.github.com/users/fossasia/orgs","repos_url":"https://api.github.com/users/fossasia/repos","events_url":"https://api.github.com/users/fossasia/events{/privacy}","received_events_url":"https://api.github.com/users/fossasia/received_events","type":"Organization","site_admin":false},"repo":{"id":35270176,"name":"open-event-orga-server","full_name":"fossasia/open-event-orga-server","owner":{"login":"fossasia","id":6295529,"avatar_url":"https://avatars.githubusercontent.com/u/6295529?v=3","gravatar_id":"","url":"https://api.github.com/users/fossasia","html_url":"https://github.com/fossasia","followers_url":"https://api.github.com/users/fossasia/followers","following_url":"https://api.github.com/users/fossasia/following{/other_user}","gists_url":"https://api.github.com/users/fossasia/gists{/gist_id}","starred_url":"https://api.github.com/users/fossasia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fossasia/subscriptions","organizations_url":"https://api.github.com/users/fossasia/orgs","repos_url":"https://api.github.com/users/fossasia/repos","events_url":"https://api.github.com/users/fossasia/events{/privacy}","received_events_url":"https://api.github.com/users/fossasia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fossasia/open-event-orga-server","description":"Open Event Orga Server","fork":false,"url":"https://api.github.com/repos/fossasia/open-event-orga-server","forks_url":"https://api.github.com/repos/fossasia/open-event-orga-server/forks","keys_url":"https://api.github.com/repos/fossasia/open-event-orga-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fossasia/open-event-orga-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fossasia/open-event-orga-server/teams","hooks_url":"https://api.github.com/repos/fossasia/open-event-orga-server/hooks","issue_events_url":"https://api.github.com/repos/fossasia/open-event-orga-server/issues/events{/number}","events_url":"https://api.github.com/repos/fossasia/open-event-orga-server/events","assignees_url":"https://api.github.com/repos/fossasia/open-event-orga-server/assignees{/user}","branches_url":"https://api.github.com/repos/fossasia/open-event-orga-server/branches{/branch}","tags_url":"https://api.github.com/repos/fossasia/open-event-orga-server/tags","blobs_url":"https://api.github.com/repos/fossasia/open-event-orga-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fossasia/open-event-orga-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fossasia/open-event-orga-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/fossasia/open-event-orga-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fossasia/open-event-orga-server/statuses/{sha}","languages_url":"https://api.github.com/repos/fossasia/open-event-orga-server/languages","stargazers_url":"https://api.github.com/repos/fossasia/open-event-orga-server/stargazers","contributors_url":"https://api.github.com/repos/fossasia/open-event-orga-server/contributors","subscribers_url":"https://api.github.com/repos/fossasia/open-event-orga-server/subscribers","subscription_url":"https://api.github.com/repos/fossasia/open-event-orga-server/subscription","commits_url":"https://api.github.com/repos/fossasia/open-event-orga-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/fossasia/open-event-orga-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/fossasia/open-event-orga-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/fossasia/open-event-orga-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/fossasia/open-event-orga-server/contents/{+path}","compare_url":"https://api.github.com/repos/fossasia/open-event-orga-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fossasia/open-event-orga-server/merges","archive_url":"https://api.github.com/repos/fossasia/open-event-orga-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fossasia/open-event-orga-server/downloads","issues_url":"https://api.github.com/repos/fossasia/open-event-orga-server/issues{/number}","pulls_url":"https://api.github.com/repos/fossasia/open-event-orga-server/pulls{/number}","milestones_url":"https://api.github.com/repos/fossasia/open-event-orga-server/milestones{/number}","notifications_url":"https://api.github.com/repos/fossasia/open-event-orga-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fossasia/open-event-orga-server/labels{/name}","releases_url":"https://api.github.com/repos/fossasia/open-event-orga-server/releases{/id}","deployments_url":"https://api.github.com/repos/fossasia/open-event-orga-server/deployments","created_at":"2015-05-08T09:16:19Z","updated_at":"2016-05-25T17:28:43Z","pushed_at":"2016-05-30T10:23:41Z","git_url":"git://github.com/fossasia/open-event-orga-server.git","ssh_url":"git@github.com:fossasia/open-event-orga-server.git","clone_url":"https://github.com/fossasia/open-event-orga-server.git","svn_url":"https://github.com/fossasia/open-event-orga-server","homepage":null,"size":2299,"stargazers_count":18,"watchers_count":18,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":44,"mirror_url":null,"open_issues_count":38,"forks":44,"open_issues":38,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fossasia/open-event-orga-server/pulls/459"},"html":{"href":"https://github.com/fossasia/open-event-orga-server/pull/459"},"issue":{"href":"https://api.github.com/repos/fossasia/open-event-orga-server/issues/459"},"comments":{"href":"https://api.github.com/repos/fossasia/open-event-orga-server/issues/459/comments"},"review_comments":{"href":"https://api.github.com/repos/fossasia/open-event-orga-server/pulls/459/comments"},"review_comment":{"href":"https://api.github.com/repos/fossasia/open-event-orga-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fossasia/open-event-orga-server/pulls/459/commits"},"statuses":{"href":"https://api.github.com/repos/fossasia/open-event-orga-server/statuses/d5dd25bcc0c0b1b5e04ac2f2af423c9db5ee42da"}}}}
{"actor":{"display_login":"juslee"}}