{"action":"created","comment":{"url":"https://api.github.com/repos/tmc-cli/tmc-cli/pulls/comments/31228541","id":31228541,"diff_hunk":"@@ -58,17 +58,40 @@ public void downloadFiles(List<Exercise> exercises) {\n \n     /**\n      * Method for downloading files if path where to download is defined.\n+     * @param exercises\n+     * @param path\n+     */\n+    public void downloadFiles(List<Exercise> exercises, String path) {\n+        downloadFiles(exercises,path,null);\n+    }\n+\n+    /**\n+     * Method for downloading files if path where to download is defined.\n+     * Also requires seperate folder name that will be created to defined path.\n      *\n      * @param exercises list of exercises which will be downloaded, list is parsed from json.\n      * @param path server path to exercises.\n+     * @param folderName folder name of where exercises will be extracted (for example course name)\n      */\n-    public void downloadFiles(List<Exercise> exercises, String path) {\n+    public void downloadFiles(List<Exercise> exercises, String path, String folderName) {\n         int exCount = 0;\n         path = getCorrectPath(path);\n+\n+        if (folderName != null && !folderName.isEmpty()) {","path":"src/main/java/hy/tmc/cli/backendcommunication/ExerciseDownloader.java","position":24,"original_position":24,"commit_id":"4d8e9baf23b08af9d460b166af03f7fe95e09a7e","original_commit_id":"4d8e9baf23b08af9d460b166af03f7fe95e09a7e","user":{"login":"jamox","id":1354151,"avatar_url":"https://avatars.githubusercontent.com/u/1354151?v=3","gravatar_id":"","url":"https://api.github.com/users/jamox","html_url":"https://github.com/jamox","followers_url":"https://api.github.com/users/jamox/followers","following_url":"https://api.github.com/users/jamox/following{/other_user}","gists_url":"https://api.github.com/users/jamox/gists{/gist_id}","starred_url":"https://api.github.com/users/jamox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamox/subscriptions","organizations_url":"https://api.github.com/users/jamox/orgs","repos_url":"https://api.github.com/users/jamox/repos","events_url":"https://api.github.com/users/jamox/events{/privacy}","received_events_url":"https://api.github.com/users/jamox/received_events","type":"User","site_admin":false},"body":"Just use http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/base/Strings.html#isNullOrEmpty(java.lang.String)","created_at":"2015-05-28T12:42:30Z","updated_at":"2015-05-28T12:42:30Z","html_url":"https://github.com/tmc-cli/tmc-cli/pull/17#discussion_r31228541","pull_request_url":"https://api.github.com/repos/tmc-cli/tmc-cli/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/tmc-cli/tmc-cli/pulls/comments/31228541"},"html":{"href":"https://github.com/tmc-cli/tmc-cli/pull/17#discussion_r31228541"},"pull_request":{"href":"https://api.github.com/repos/tmc-cli/tmc-cli/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/tmc-cli/tmc-cli/pulls/17","id":36399532,"html_url":"https://github.com/tmc-cli/tmc-cli/pull/17","diff_url":"https://github.com/tmc-cli/tmc-cli/pull/17.diff","patch_url":"https://github.com/tmc-cli/tmc-cli/pull/17.patch","issue_url":"https://api.github.com/repos/tmc-cli/tmc-cli/issues/17","number":17,"state":"open","locked":false,"title":"DownloadExercise now creates a seperate folder for course","user":{"login":"JaniL","id":60955,"avatar_url":"https://avatars.githubusercontent.com/u/60955?v=3","gravatar_id":"","url":"https://api.github.com/users/JaniL","html_url":"https://github.com/JaniL","followers_url":"https://api.github.com/users/JaniL/followers","following_url":"https://api.github.com/users/JaniL/following{/other_user}","gists_url":"https://api.github.com/users/JaniL/gists{/gist_id}","starred_url":"https://api.github.com/users/JaniL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JaniL/subscriptions","organizations_url":"https://api.github.com/users/JaniL/orgs","repos_url":"https://api.github.com/users/JaniL/repos","events_url":"https://api.github.com/users/JaniL/events{/privacy}","received_events_url":"https://api.github.com/users/JaniL/received_events","type":"User","site_admin":false},"body":"Course folder is named by course's name.\r\n\r\nAlso Course object now also knows all exercises of it.","created_at":"2015-05-28T12:07:40Z","updated_at":"2015-05-28T12:42:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f08fd29d557fb6b7d687057d5398aa3bd2dff934","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tmc-cli/tmc-cli/pulls/17/commits","review_comments_url":"https://api.github.com/repos/tmc-cli/tmc-cli/pulls/17/comments","review_comment_url":"https://api.github.com/repos/tmc-cli/tmc-cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tmc-cli/tmc-cli/issues/17/comments","statuses_url":"https://api.github.com/repos/tmc-cli/tmc-cli/statuses/4d8e9baf23b08af9d460b166af03f7fe95e09a7e","head":{"label":"tmc-cli:exercisedl","ref":"exercisedl","sha":"4d8e9baf23b08af9d460b166af03f7fe95e09a7e","user":{"login":"tmc-cli","id":12210845,"avatar_url":"https://avatars.githubusercontent.com/u/12210845?v=3","gravatar_id":"","url":"https://api.github.com/users/tmc-cli","html_url":"https://github.com/tmc-cli","followers_url":"https://api.github.com/users/tmc-cli/followers","following_url":"https://api.github.com/users/tmc-cli/following{/other_user}","gists_url":"https://api.github.com/users/tmc-cli/gists{/gist_id}","starred_url":"https://api.github.com/users/tmc-cli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmc-cli/subscriptions","organizations_url":"https://api.github.com/users/tmc-cli/orgs","repos_url":"https://api.github.com/users/tmc-cli/repos","events_url":"https://api.github.com/users/tmc-cli/events{/privacy}","received_events_url":"https://api.github.com/users/tmc-cli/received_events","type":"Organization","site_admin":false},"repo":{"id":35415454,"name":"tmc-cli","full_name":"tmc-cli/tmc-cli","owner":{"login":"tmc-cli","id":12210845,"avatar_url":"https://avatars.githubusercontent.com/u/12210845?v=3","gravatar_id":"","url":"https://api.github.com/users/tmc-cli","html_url":"https://github.com/tmc-cli","followers_url":"https://api.github.com/users/tmc-cli/followers","following_url":"https://api.github.com/users/tmc-cli/following{/other_user}","gists_url":"https://api.github.com/users/tmc-cli/gists{/gist_id}","starred_url":"https://api.github.com/users/tmc-cli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmc-cli/subscriptions","organizations_url":"https://api.github.com/users/tmc-cli/orgs","repos_url":"https://api.github.com/users/tmc-cli/repos","events_url":"https://api.github.com/users/tmc-cli/events{/privacy}","received_events_url":"https://api.github.com/users/tmc-cli/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tmc-cli/tmc-cli","description":"Command Line client for Test My Code","fork":false,"url":"https://api.github.com/repos/tmc-cli/tmc-cli","forks_url":"https://api.github.com/repos/tmc-cli/tmc-cli/forks","keys_url":"https://api.github.com/repos/tmc-cli/tmc-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tmc-cli/tmc-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tmc-cli/tmc-cli/teams","hooks_url":"https://api.github.com/repos/tmc-cli/tmc-cli/hooks","issue_events_url":"https://api.github.com/repos/tmc-cli/tmc-cli/issues/events{/number}","events_url":"https://api.github.com/repos/tmc-cli/tmc-cli/events","assignees_url":"https://api.github.com/repos/tmc-cli/tmc-cli/assignees{/user}","branches_url":"https://api.github.com/repos/tmc-cli/tmc-cli/branches{/branch}","tags_url":"https://api.github.com/repos/tmc-cli/tmc-cli/tags","blobs_url":"https://api.github.com/repos/tmc-cli/tmc-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tmc-cli/tmc-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tmc-cli/tmc-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/tmc-cli/tmc-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tmc-cli/tmc-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/tmc-cli/tmc-cli/languages","stargazers_url":"https://api.github.com/repos/tmc-cli/tmc-cli/stargazers","contributors_url":"https://api.github.com/repos/tmc-cli/tmc-cli/contributors","subscribers_url":"https://api.github.com/repos/tmc-cli/tmc-cli/subscribers","subscription_url":"https://api.github.com/repos/tmc-cli/tmc-cli/subscription","commits_url":"https://api.github.com/repos/tmc-cli/tmc-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/tmc-cli/tmc-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/tmc-cli/tmc-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/tmc-cli/tmc-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/tmc-cli/tmc-cli/contents/{+path}","compare_url":"https://api.github.com/repos/tmc-cli/tmc-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tmc-cli/tmc-cli/merges","archive_url":"https://api.github.com/repos/tmc-cli/tmc-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tmc-cli/tmc-cli/downloads","issues_url":"https://api.github.com/repos/tmc-cli/tmc-cli/issues{/number}","pulls_url":"https://api.github.com/repos/tmc-cli/tmc-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/tmc-cli/tmc-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/tmc-cli/tmc-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tmc-cli/tmc-cli/labels{/name}","releases_url":"https://api.github.com/repos/tmc-cli/tmc-cli/releases{/id}","created_at":"2015-05-11T09:51:02Z","updated_at":"2015-05-25T06:08:26Z","pushed_at":"2015-05-28T12:37:11Z","git_url":"git://github.com/tmc-cli/tmc-cli.git","ssh_url":"git@github.com:tmc-cli/tmc-cli.git","clone_url":"https://github.com/tmc-cli/tmc-cli.git","svn_url":"https://github.com/tmc-cli/tmc-cli","homepage":"","size":46795,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"tmc-cli:master","ref":"master","sha":"dd08505a69b1f1a670b0cfff9cc49cf499b5d580","user":{"login":"tmc-cli","id":12210845,"avatar_url":"https://avatars.githubusercontent.com/u/12210845?v=3","gravatar_id":"","url":"https://api.github.com/users/tmc-cli","html_url":"https://github.com/tmc-cli","followers_url":"https://api.github.com/users/tmc-cli/followers","following_url":"https://api.github.com/users/tmc-cli/following{/other_user}","gists_url":"https://api.github.com/users/tmc-cli/gists{/gist_id}","starred_url":"https://api.github.com/users/tmc-cli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmc-cli/subscriptions","organizations_url":"https://api.github.com/users/tmc-cli/orgs","repos_url":"https://api.github.com/users/tmc-cli/repos","events_url":"https://api.github.com/users/tmc-cli/events{/privacy}","received_events_url":"https://api.github.com/users/tmc-cli/received_events","type":"Organization","site_admin":false},"repo":{"id":35415454,"name":"tmc-cli","full_name":"tmc-cli/tmc-cli","owner":{"login":"tmc-cli","id":12210845,"avatar_url":"https://avatars.githubusercontent.com/u/12210845?v=3","gravatar_id":"","url":"https://api.github.com/users/tmc-cli","html_url":"https://github.com/tmc-cli","followers_url":"https://api.github.com/users/tmc-cli/followers","following_url":"https://api.github.com/users/tmc-cli/following{/other_user}","gists_url":"https://api.github.com/users/tmc-cli/gists{/gist_id}","starred_url":"https://api.github.com/users/tmc-cli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmc-cli/subscriptions","organizations_url":"https://api.github.com/users/tmc-cli/orgs","repos_url":"https://api.github.com/users/tmc-cli/repos","events_url":"https://api.github.com/users/tmc-cli/events{/privacy}","received_events_url":"https://api.github.com/users/tmc-cli/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tmc-cli/tmc-cli","description":"Command Line client for Test My Code","fork":false,"url":"https://api.github.com/repos/tmc-cli/tmc-cli","forks_url":"https://api.github.com/repos/tmc-cli/tmc-cli/forks","keys_url":"https://api.github.com/repos/tmc-cli/tmc-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tmc-cli/tmc-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tmc-cli/tmc-cli/teams","hooks_url":"https://api.github.com/repos/tmc-cli/tmc-cli/hooks","issue_events_url":"https://api.github.com/repos/tmc-cli/tmc-cli/issues/events{/number}","events_url":"https://api.github.com/repos/tmc-cli/tmc-cli/events","assignees_url":"https://api.github.com/repos/tmc-cli/tmc-cli/assignees{/user}","branches_url":"https://api.github.com/repos/tmc-cli/tmc-cli/branches{/branch}","tags_url":"https://api.github.com/repos/tmc-cli/tmc-cli/tags","blobs_url":"https://api.github.com/repos/tmc-cli/tmc-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tmc-cli/tmc-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tmc-cli/tmc-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/tmc-cli/tmc-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tmc-cli/tmc-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/tmc-cli/tmc-cli/languages","stargazers_url":"https://api.github.com/repos/tmc-cli/tmc-cli/stargazers","contributors_url":"https://api.github.com/repos/tmc-cli/tmc-cli/contributors","subscribers_url":"https://api.github.com/repos/tmc-cli/tmc-cli/subscribers","subscription_url":"https://api.github.com/repos/tmc-cli/tmc-cli/subscription","commits_url":"https://api.github.com/repos/tmc-cli/tmc-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/tmc-cli/tmc-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/tmc-cli/tmc-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/tmc-cli/tmc-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/tmc-cli/tmc-cli/contents/{+path}","compare_url":"https://api.github.com/repos/tmc-cli/tmc-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tmc-cli/tmc-cli/merges","archive_url":"https://api.github.com/repos/tmc-cli/tmc-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tmc-cli/tmc-cli/downloads","issues_url":"https://api.github.com/repos/tmc-cli/tmc-cli/issues{/number}","pulls_url":"https://api.github.com/repos/tmc-cli/tmc-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/tmc-cli/tmc-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/tmc-cli/tmc-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tmc-cli/tmc-cli/labels{/name}","releases_url":"https://api.github.com/repos/tmc-cli/tmc-cli/releases{/id}","created_at":"2015-05-11T09:51:02Z","updated_at":"2015-05-25T06:08:26Z","pushed_at":"2015-05-28T12:37:11Z","git_url":"git://github.com/tmc-cli/tmc-cli.git","ssh_url":"git@github.com:tmc-cli/tmc-cli.git","clone_url":"https://github.com/tmc-cli/tmc-cli.git","svn_url":"https://github.com/tmc-cli/tmc-cli","homepage":"","size":46795,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tmc-cli/tmc-cli/pulls/17"},"html":{"href":"https://github.com/tmc-cli/tmc-cli/pull/17"},"issue":{"href":"https://api.github.com/repos/tmc-cli/tmc-cli/issues/17"},"comments":{"href":"https://api.github.com/repos/tmc-cli/tmc-cli/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/tmc-cli/tmc-cli/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/tmc-cli/tmc-cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tmc-cli/tmc-cli/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/tmc-cli/tmc-cli/statuses/4d8e9baf23b08af9d460b166af03f7fe95e09a7e"}}}}