{"action":"created","issue":{"url":"https://api.github.com/repos/hesa/coachassistant/issues/9","labels_url":"https://api.github.com/repos/hesa/coachassistant/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/hesa/coachassistant/issues/9/comments","events_url":"https://api.github.com/repos/hesa/coachassistant/issues/9/events","html_url":"https://github.com/hesa/coachassistant/issues/9","id":91937760,"number":9,"title":"Video uploading endpoint","user":{"login":"jonkri","id":777056,"avatar_url":"https://avatars.githubusercontent.com/u/777056?v=3","gravatar_id":"","url":"https://api.github.com/users/jonkri","html_url":"https://github.com/jonkri","followers_url":"https://api.github.com/users/jonkri/followers","following_url":"https://api.github.com/users/jonkri/following{/other_user}","gists_url":"https://api.github.com/users/jonkri/gists{/gist_id}","starred_url":"https://api.github.com/users/jonkri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonkri/subscriptions","organizations_url":"https://api.github.com/users/jonkri/orgs","repos_url":"https://api.github.com/users/jonkri/repos","events_url":"https://api.github.com/users/jonkri/events{/privacy}","received_events_url":"https://api.github.com/users/jonkri/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"jonkri","id":777056,"avatar_url":"https://avatars.githubusercontent.com/u/777056?v=3","gravatar_id":"","url":"https://api.github.com/users/jonkri","html_url":"https://github.com/jonkri","followers_url":"https://api.github.com/users/jonkri/followers","following_url":"https://api.github.com/users/jonkri/following{/other_user}","gists_url":"https://api.github.com/users/jonkri/gists{/gist_id}","starred_url":"https://api.github.com/users/jonkri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonkri/subscriptions","organizations_url":"https://api.github.com/users/jonkri/orgs","repos_url":"https://api.github.com/users/jonkri/repos","events_url":"https://api.github.com/users/jonkri/events{/privacy}","received_events_url":"https://api.github.com/users/jonkri/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2015-06-29T23:54:08Z","updated_at":"2015-07-06T21:10:28Z","closed_at":null,"body":"Uploading a video file would work something like this:\r\n\r\n1. A file would be uploaded in a standard HTTP way (using <code>POST</code> and the <code>multipart/form-data</code> encoding to something like <code>/upload-video</code>)\r\n2. The server, upon receiving the file, would return <code>202 Accepted</code>, and in the body include the identifier of the asynchronous video conversion job that has now started\r\n3. The client polls the server using <code>GET</code> at something like <code>/query-video/&lt;ID&gt;</code>; while the server is processing the video, it will respond with <code>200 OK</code> and something like <code>Processing</code> in the body; when the server is done processing the video, it will respond with either <code>303 See Other</code> with the identifier of the new processed video in the body, or <code>200 OK</code> and something like <code>Failure</code> in the body\r\n4. Upon receiving the <coe>303 See Other</code> code, the client can now fetch the video at an endpoint such as <code>/video/&lt;id&gt;</code> using <code>GET</code>\r\n\r\nI will create a mock endpoint for this soon providing the same video back as uploaded after a certain amount of time, after which I'm planning to taking a look at converting the video to a proper/compressed format using something like ffmpeg."},"comment":{"url":"https://api.github.com/repos/hesa/coachassistant/issues/comments/118999362","html_url":"https://github.com/hesa/coachassistant/issues/9#issuecomment-118999362","issue_url":"https://api.github.com/repos/hesa/coachassistant/issues/9","id":118999362,"user":{"login":"jonkri","id":777056,"avatar_url":"https://avatars.githubusercontent.com/u/777056?v=3","gravatar_id":"","url":"https://api.github.com/users/jonkri","html_url":"https://github.com/jonkri","followers_url":"https://api.github.com/users/jonkri/followers","following_url":"https://api.github.com/users/jonkri/following{/other_user}","gists_url":"https://api.github.com/users/jonkri/gists{/gist_id}","starred_url":"https://api.github.com/users/jonkri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonkri/subscriptions","organizations_url":"https://api.github.com/users/jonkri/orgs","repos_url":"https://api.github.com/users/jonkri/repos","events_url":"https://api.github.com/users/jonkri/events{/privacy}","received_events_url":"https://api.github.com/users/jonkri/received_events","type":"User","site_admin":false},"created_at":"2015-07-06T21:10:28Z","updated_at":"2015-07-06T21:10:28Z","body":"Ah, not yet.\r\n\r\nThere are currently no relations between anything other than the Video and Club entities.\r\n\r\nI just added a \"created\" field to the entities, so that we know when they were created. I also made endpoints like <code>/v0.0.0/clubs/ccd11959-4497-4d27-99b6-7467b2445809/videos</code> return the list of video UUIDs that has been successfully uploaded.\r\n\r\nFor the remaining requests I suppose that each video should be able to reference a team and a training phase (at most one of each for now)."}}