{"action":"created","comment":{"url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/pulls/comments/39185555","id":39185555,"diff_hunk":"@@ -1,17 +1,82 @@\n package edu.umich.tl;\n \n+import java.io.BufferedReader;\n+import java.io.IOException;\n+import java.io.InputStreamReader;\n+import java.util.Properties;\n \n import org.apache.commons.logging.Log;\n import org.apache.commons.logging.LogFactory;\n+import org.apache.http.HttpResponse;\n+\n+import edu.umich.tl.ApiCallHandler.ApiTypes;\n+\n \n \n public class CourseDelete {\n+\tprivate static final String CANVAS_URL = \"canvas.url\";\n+\tprivate static final String CANVAS_TOKEN = \"canvas.token\";\n+\tprivate static final String ESB_URL = \"esb.url\";\n \tprivate static Log M_log = LogFactory.getLog(CourseDelete.class);\n+\tprotected static String canvasURL = null;\n+\tprotected static String canvasToken = null;\n+\tprotected static String esbURL = null;\n+\t//This parameter decide to make canvas or ESB api call\n+\tprivate static int typeOfApiCall;\n \n \tpublic static void main(String[] args) {\n-\t\tM_log.debug(\"main(): called\");\n-\n+\t\tM_log.info(\"main(): called\");\n+\t\treadPropertyFiles(args);\n+\t\tApiCallHandler apiHandler=new ApiCallHandler();\n+\t\tapiCurrentTerm(apiHandler);\n \t}\n \n+\tprivate static void readPropertyFiles(String[] args) {\n+\t\tM_log.debug(\"readPropertyFiles(): called\");\n+\t\tProperties properties = null;\n+\t\tString propFileLocation;\n+\t\t if(args.length == 0) {\n+\t\t\t M_log.error(\"Command line arguments are not provided\");\n+\t\t\t System.exit(0);\n+\t\t }\n+\t\t    propFileLocation = args[1];\n+\t\t    typeOfApiCall=Integer.parseInt(args[0]);\n+\t\t\tproperties = DeleteUtils.getPropertiesFromURL(propFileLocation);\n+\t\t\tcanvasToken = properties.getProperty(CANVAS_TOKEN);\n+\t\t\tcanvasURL = properties.getProperty(CANVAS_URL);\n+\t\t\tesbURL=properties.getProperty(ESB_URL);\n+\t}\n+\t\n+\tprivate static void apiCurrentTerm(ApiCallHandler apiHandler) {","path":"src/main/java/edu/umich/tl/CourseDelete.java","position":52,"original_position":52,"commit_id":"736d32e8b2a0a8f42a86c0d3eaa88871141fd17e","original_commit_id":"736d32e8b2a0a8f42a86c0d3eaa88871141fd17e","user":{"login":"bkirschn","id":138902,"avatar_url":"https://avatars.githubusercontent.com/u/138902?v=3","gravatar_id":"","url":"https://api.github.com/users/bkirschn","html_url":"https://github.com/bkirschn","followers_url":"https://api.github.com/users/bkirschn/followers","following_url":"https://api.github.com/users/bkirschn/following{/other_user}","gists_url":"https://api.github.com/users/bkirschn/gists{/gist_id}","starred_url":"https://api.github.com/users/bkirschn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkirschn/subscriptions","organizations_url":"https://api.github.com/users/bkirschn/orgs","repos_url":"https://api.github.com/users/bkirschn/repos","events_url":"https://api.github.com/users/bkirschn/events{/privacy}","received_events_url":"https://api.github.com/users/bkirschn/received_events","type":"User","site_admin":false},"body":"better name: getCurrentTerm()","created_at":"2015-09-10T17:08:59Z","updated_at":"2015-09-10T17:08:59Z","html_url":"https://github.com/tl-its-umich-edu/canvasCourseDeleteUtility/pull/2#discussion_r39185555","pull_request_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/pulls/comments/39185555"},"html":{"href":"https://github.com/tl-its-umich-edu/canvasCourseDeleteUtility/pull/2#discussion_r39185555"},"pull_request":{"href":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/pulls/2","id":44678399,"html_url":"https://github.com/tl-its-umich-edu/canvasCourseDeleteUtility/pull/2","diff_url":"https://github.com/tl-its-umich-edu/canvasCourseDeleteUtility/pull/2.diff","patch_url":"https://github.com/tl-its-umich-edu/canvasCourseDeleteUtility/pull/2.patch","issue_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/issues/2","number":2,"state":"open","locked":false,"title":"TLUNIZIN-148 Api call to canvas and stub for ESB for future usage","user":{"login":"pushyamig","id":8579775,"avatar_url":"https://avatars.githubusercontent.com/u/8579775?v=3","gravatar_id":"","url":"https://api.github.com/users/pushyamig","html_url":"https://github.com/pushyamig","followers_url":"https://api.github.com/users/pushyamig/followers","following_url":"https://api.github.com/users/pushyamig/following{/other_user}","gists_url":"https://api.github.com/users/pushyamig/gists{/gist_id}","starred_url":"https://api.github.com/users/pushyamig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pushyamig/subscriptions","organizations_url":"https://api.github.com/users/pushyamig/orgs","repos_url":"https://api.github.com/users/pushyamig/repos","events_url":"https://api.github.com/users/pushyamig/events{/privacy}","received_events_url":"https://api.github.com/users/pushyamig/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-09-10T14:59:09Z","updated_at":"2015-09-10T17:08:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c69b9395233770af30b57566ad315740ae82ddb3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/pulls/2/commits","review_comments_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/pulls/2/comments","review_comment_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/issues/2/comments","statuses_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/statuses/736d32e8b2a0a8f42a86c0d3eaa88871141fd17e","head":{"label":"tl-its-umich-edu:TLUNIZIN-148","ref":"TLUNIZIN-148","sha":"736d32e8b2a0a8f42a86c0d3eaa88871141fd17e","user":{"login":"tl-its-umich-edu","id":8292960,"avatar_url":"https://avatars.githubusercontent.com/u/8292960?v=3","gravatar_id":"","url":"https://api.github.com/users/tl-its-umich-edu","html_url":"https://github.com/tl-its-umich-edu","followers_url":"https://api.github.com/users/tl-its-umich-edu/followers","following_url":"https://api.github.com/users/tl-its-umich-edu/following{/other_user}","gists_url":"https://api.github.com/users/tl-its-umich-edu/gists{/gist_id}","starred_url":"https://api.github.com/users/tl-its-umich-edu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tl-its-umich-edu/subscriptions","organizations_url":"https://api.github.com/users/tl-its-umich-edu/orgs","repos_url":"https://api.github.com/users/tl-its-umich-edu/repos","events_url":"https://api.github.com/users/tl-its-umich-edu/events{/privacy}","received_events_url":"https://api.github.com/users/tl-its-umich-edu/received_events","type":"Organization","site_admin":false},"repo":{"id":41931279,"name":"canvasCourseDeleteUtility","full_name":"tl-its-umich-edu/canvasCourseDeleteUtility","owner":{"login":"tl-its-umich-edu","id":8292960,"avatar_url":"https://avatars.githubusercontent.com/u/8292960?v=3","gravatar_id":"","url":"https://api.github.com/users/tl-its-umich-edu","html_url":"https://github.com/tl-its-umich-edu","followers_url":"https://api.github.com/users/tl-its-umich-edu/followers","following_url":"https://api.github.com/users/tl-its-umich-edu/following{/other_user}","gists_url":"https://api.github.com/users/tl-its-umich-edu/gists{/gist_id}","starred_url":"https://api.github.com/users/tl-its-umich-edu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tl-its-umich-edu/subscriptions","organizations_url":"https://api.github.com/users/tl-its-umich-edu/orgs","repos_url":"https://api.github.com/users/tl-its-umich-edu/repos","events_url":"https://api.github.com/users/tl-its-umich-edu/events{/privacy}","received_events_url":"https://api.github.com/users/tl-its-umich-edu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tl-its-umich-edu/canvasCourseDeleteUtility","description":"","fork":false,"url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility","forks_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/forks","keys_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/teams","hooks_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/hooks","issue_events_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/issues/events{/number}","events_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/events","assignees_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/assignees{/user}","branches_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/branches{/branch}","tags_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/tags","blobs_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/git/refs{/sha}","trees_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/statuses/{sha}","languages_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/languages","stargazers_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/stargazers","contributors_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/contributors","subscribers_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/subscribers","subscription_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/subscription","commits_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/commits{/sha}","git_commits_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/git/commits{/sha}","comments_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/comments{/number}","issue_comment_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/issues/comments{/number}","contents_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/contents/{+path}","compare_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/merges","archive_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/downloads","issues_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/issues{/number}","pulls_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/pulls{/number}","milestones_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/milestones{/number}","notifications_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/labels{/name}","releases_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/releases{/id}","created_at":"2015-09-04T18:21:53Z","updated_at":"2015-09-10T14:18:56Z","pushed_at":"2015-09-10T14:59:09Z","git_url":"git://github.com/tl-its-umich-edu/canvasCourseDeleteUtility.git","ssh_url":"git@github.com:tl-its-umich-edu/canvasCourseDeleteUtility.git","clone_url":"https://github.com/tl-its-umich-edu/canvasCourseDeleteUtility.git","svn_url":"https://github.com/tl-its-umich-edu/canvasCourseDeleteUtility","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"master"}},"base":{"label":"tl-its-umich-edu:master","ref":"master","sha":"a69a8fb6c46eae71c1be926e11b00df6dac78c48","user":{"login":"tl-its-umich-edu","id":8292960,"avatar_url":"https://avatars.githubusercontent.com/u/8292960?v=3","gravatar_id":"","url":"https://api.github.com/users/tl-its-umich-edu","html_url":"https://github.com/tl-its-umich-edu","followers_url":"https://api.github.com/users/tl-its-umich-edu/followers","following_url":"https://api.github.com/users/tl-its-umich-edu/following{/other_user}","gists_url":"https://api.github.com/users/tl-its-umich-edu/gists{/gist_id}","starred_url":"https://api.github.com/users/tl-its-umich-edu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tl-its-umich-edu/subscriptions","organizations_url":"https://api.github.com/users/tl-its-umich-edu/orgs","repos_url":"https://api.github.com/users/tl-its-umich-edu/repos","events_url":"https://api.github.com/users/tl-its-umich-edu/events{/privacy}","received_events_url":"https://api.github.com/users/tl-its-umich-edu/received_events","type":"Organization","site_admin":false},"repo":{"id":41931279,"name":"canvasCourseDeleteUtility","full_name":"tl-its-umich-edu/canvasCourseDeleteUtility","owner":{"login":"tl-its-umich-edu","id":8292960,"avatar_url":"https://avatars.githubusercontent.com/u/8292960?v=3","gravatar_id":"","url":"https://api.github.com/users/tl-its-umich-edu","html_url":"https://github.com/tl-its-umich-edu","followers_url":"https://api.github.com/users/tl-its-umich-edu/followers","following_url":"https://api.github.com/users/tl-its-umich-edu/following{/other_user}","gists_url":"https://api.github.com/users/tl-its-umich-edu/gists{/gist_id}","starred_url":"https://api.github.com/users/tl-its-umich-edu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tl-its-umich-edu/subscriptions","organizations_url":"https://api.github.com/users/tl-its-umich-edu/orgs","repos_url":"https://api.github.com/users/tl-its-umich-edu/repos","events_url":"https://api.github.com/users/tl-its-umich-edu/events{/privacy}","received_events_url":"https://api.github.com/users/tl-its-umich-edu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tl-its-umich-edu/canvasCourseDeleteUtility","description":"","fork":false,"url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility","forks_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/forks","keys_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/teams","hooks_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/hooks","issue_events_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/issues/events{/number}","events_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/events","assignees_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/assignees{/user}","branches_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/branches{/branch}","tags_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/tags","blobs_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/git/refs{/sha}","trees_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/statuses/{sha}","languages_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/languages","stargazers_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/stargazers","contributors_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/contributors","subscribers_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/subscribers","subscription_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/subscription","commits_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/commits{/sha}","git_commits_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/git/commits{/sha}","comments_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/comments{/number}","issue_comment_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/issues/comments{/number}","contents_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/contents/{+path}","compare_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/merges","archive_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/downloads","issues_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/issues{/number}","pulls_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/pulls{/number}","milestones_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/milestones{/number}","notifications_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/labels{/name}","releases_url":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/releases{/id}","created_at":"2015-09-04T18:21:53Z","updated_at":"2015-09-10T14:18:56Z","pushed_at":"2015-09-10T14:59:09Z","git_url":"git://github.com/tl-its-umich-edu/canvasCourseDeleteUtility.git","ssh_url":"git@github.com:tl-its-umich-edu/canvasCourseDeleteUtility.git","clone_url":"https://github.com/tl-its-umich-edu/canvasCourseDeleteUtility.git","svn_url":"https://github.com/tl-its-umich-edu/canvasCourseDeleteUtility","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/pulls/2"},"html":{"href":"https://github.com/tl-its-umich-edu/canvasCourseDeleteUtility/pull/2"},"issue":{"href":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/issues/2"},"comments":{"href":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/tl-its-umich-edu/canvasCourseDeleteUtility/statuses/736d32e8b2a0a8f42a86c0d3eaa88871141fd17e"}}}}