GitHub PullRequestEvent at 2014-11-08 22:55:37
Repository: CSharpMtgDb.Info
Actor: rezalas
Payload: {"action":"opened","number":12,"pull_request":{"url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/pulls/12","id":24107333,"html_url":"https://github.com/planeswalkers/CSharpMtgDb.Info/pull/12","diff_url":"https://github.com/planeswalkers/CSharpMtgDb.Info/pull/12.diff","patch_url":"https://github.com/planeswalkers/CSharpMtgDb.Info/pull/12.patch","issue_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/issues/12","number":12,"state":"open","locked":false,"title":"Refactored the Db.cs class to implement DRY and increase performance. ","user":{"login":"rezalas","id":4770241,"avatar_url":"https://avatars.githubusercontent.com/u/4770241?v=3","gravatar_id":"","url":"https://api.github.com/users/rezalas","html_url":"https://github.com/rezalas","followers_url":"https://api.github.com/users/rezalas/followers","following_url":"https://api.github.com/users/rezalas/following{/other_user}","gists_url":"https://api.github.com/users/rezalas/gists{/gist_id}","starred_url":"https://api.github.com/users/rezalas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rezalas/subscriptions","organizations_url":"https://api.github.com/users/rezalas/orgs","repos_url":"https://api.github.com/users/rezalas/repos","events_url":"https://api.github.com/users/rezalas/events{/privacy}","received_events_url":"https://api.github.com/users/rezalas/received_events","type":"User","site_admin":false},"body":"I noticed the methods repeat themselves quite a bit, so I implemented DRY to remote the webClient work out of all the individual methods (following the single responsibility principle).I also added exception handling in the event of a failed endpoint, and added default return value safety into the CallApi method which implements it for all methods due to the DRY rework.","created_at":"2014-11-08T22:55:37Z","updated_at":"2014-11-08T22:55:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/pulls/12/commits","review_comments_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/pulls/12/comments","review_comment_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/pulls/comments/{number}","comments_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/issues/12/comments","statuses_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/statuses/6a18862847c0b209c9aff6fbcfb176555dbea94a","head":{"label":"rezalas:master","ref":"master","sha":"6a18862847c0b209c9aff6fbcfb176555dbea94a","user":{"login":"rezalas","id":4770241,"avatar_url":"https://avatars.githubusercontent.com/u/4770241?v=3","gravatar_id":"","url":"https://api.github.com/users/rezalas","html_url":"https://github.com/rezalas","followers_url":"https://api.github.com/users/rezalas/followers","following_url":"https://api.github.com/users/rezalas/following{/other_user}","gists_url":"https://api.github.com/users/rezalas/gists{/gist_id}","starred_url":"https://api.github.com/users/rezalas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rezalas/subscriptions","organizations_url":"https://api.github.com/users/rezalas/orgs","repos_url":"https://api.github.com/users/rezalas/repos","events_url":"https://api.github.com/users/rezalas/events{/privacy}","received_events_url":"https://api.github.com/users/rezalas/received_events","type":"User","site_admin":false},"repo":{"id":26376271,"name":"CSharpMtgDb.Info","full_name":"rezalas/CSharpMtgDb.Info","owner":{"login":"rezalas","id":4770241,"avatar_url":"https://avatars.githubusercontent.com/u/4770241?v=3","gravatar_id":"","url":"https://api.github.com/users/rezalas","html_url":"https://github.com/rezalas","followers_url":"https://api.github.com/users/rezalas/followers","following_url":"https://api.github.com/users/rezalas/following{/other_user}","gists_url":"https://api.github.com/users/rezalas/gists{/gist_id}","starred_url":"https://api.github.com/users/rezalas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rezalas/subscriptions","organizations_url":"https://api.github.com/users/rezalas/orgs","repos_url":"https://api.github.com/users/rezalas/repos","events_url":"https://api.github.com/users/rezalas/events{/privacy}","received_events_url":"https://api.github.com/users/rezalas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rezalas/CSharpMtgDb.Info","description":"C# driver for api.mtgdb.info","fork":true,"url":"https://api.github.com/repos/rezalas/CSharpMtgDb.Info","forks_url":"https://api.github.com/repos/rezalas/CSharpMtgDb.Info/forks","keys_url":"https://api.github.com/repos/rezalas/CSharpMtgDb.Info/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rezalas/CSharpMtgDb.Info/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rezalas/CSharpMtgDb.Info/teams","hooks_url":"https://api.github.com/repos/rezalas/CSharpMtgDb.Info/hooks","issue_events_url":"https://api.github.com/repos/rezalas/CSharpMtgDb.Info/issues/events{/number}","events_url":"https://api.github.com/repos/rezalas/CSharpMtgDb.Info/events","assignees_url":"https://api.github.com/repos/rezalas/CSharpMtgDb.Info/assignees{/user}","branches_url":"https://api.github.com/repos/rezalas/CSharpMtgDb.Info/branches{/branch}","tags_url":"https://api.github.com/repos/rezalas/CSharpMtgDb.Info/tags","blobs_url":"https://api.github.com/repos/rezalas/CSharpMtgDb.Info/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rezalas/CSharpMtgDb.Info/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rezalas/CSharpMtgDb.Info/git/refs{/sha}","trees_url":"https://api.github.com/repos/rezalas/CSharpMtgDb.Info/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rezalas/CSharpMtgDb.Info/statuses/{sha}","languages_url":"https://api.github.com/repos/rezalas/CSharpMtgDb.Info/languages","stargazers_url":"https://api.github.com/repos/rezalas/CSharpMtgDb.Info/stargazers","contributors_url":"https://api.github.com/repos/rezalas/CSharpMtgDb.Info/contributors","subscribers_url":"https://api.github.com/repos/rezalas/CSharpMtgDb.Info/subscribers","subscription_url":"https://api.github.com/repos/rezalas/CSharpMtgDb.Info/subscription","commits_url":"https://api.github.com/repos/rezalas/CSharpMtgDb.Info/commits{/sha}","git_commits_url":"https://api.github.com/repos/rezalas/CSharpMtgDb.Info/git/commits{/sha}","comments_url":"https://api.github.com/repos/rezalas/CSharpMtgDb.Info/comments{/number}","issue_comment_url":"https://api.github.com/repos/rezalas/CSharpMtgDb.Info/issues/comments/{number}","contents_url":"https://api.github.com/repos/rezalas/CSharpMtgDb.Info/contents/{+path}","compare_url":"https://api.github.com/repos/rezalas/CSharpMtgDb.Info/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rezalas/CSharpMtgDb.Info/merges","archive_url":"https://api.github.com/repos/rezalas/CSharpMtgDb.Info/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rezalas/CSharpMtgDb.Info/downloads","issues_url":"https://api.github.com/repos/rezalas/CSharpMtgDb.Info/issues{/number}","pulls_url":"https://api.github.com/repos/rezalas/CSharpMtgDb.Info/pulls{/number}","milestones_url":"https://api.github.com/repos/rezalas/CSharpMtgDb.Info/milestones{/number}","notifications_url":"https://api.github.com/repos/rezalas/CSharpMtgDb.Info/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rezalas/CSharpMtgDb.Info/labels{/name}","releases_url":"https://api.github.com/repos/rezalas/CSharpMtgDb.Info/releases{/id}","created_at":"2014-11-08T22:04:02Z","updated_at":"2014-11-08T22:50:41Z","pushed_at":"2014-11-08T22:50:41Z","git_url":"git://github.com/rezalas/CSharpMtgDb.Info.git","ssh_url":"git@github.com:rezalas/CSharpMtgDb.Info.git","clone_url":"https://github.com/rezalas/CSharpMtgDb.Info.git","svn_url":"https://github.com/rezalas/CSharpMtgDb.Info","homepage":"https://www.mtgdb.info","size":147,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"planeswalkers:master","ref":"master","sha":"2aef1607092f791c58e4427497c1569d57006dcc","user":{"login":"planeswalkers","id":5463470,"avatar_url":"https://avatars.githubusercontent.com/u/5463470?v=3","gravatar_id":"","url":"https://api.github.com/users/planeswalkers","html_url":"https://github.com/planeswalkers","followers_url":"https://api.github.com/users/planeswalkers/followers","following_url":"https://api.github.com/users/planeswalkers/following{/other_user}","gists_url":"https://api.github.com/users/planeswalkers/gists{/gist_id}","starred_url":"https://api.github.com/users/planeswalkers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/planeswalkers/subscriptions","organizations_url":"https://api.github.com/users/planeswalkers/orgs","repos_url":"https://api.github.com/users/planeswalkers/repos","events_url":"https://api.github.com/users/planeswalkers/events{/privacy}","received_events_url":"https://api.github.com/users/planeswalkers/received_events","type":"Organization","site_admin":false},"repo":{"id":17412188,"name":"CSharpMtgDb.Info","full_name":"planeswalkers/CSharpMtgDb.Info","owner":{"login":"planeswalkers","id":5463470,"avatar_url":"https://avatars.githubusercontent.com/u/5463470?v=3","gravatar_id":"","url":"https://api.github.com/users/planeswalkers","html_url":"https://github.com/planeswalkers","followers_url":"https://api.github.com/users/planeswalkers/followers","following_url":"https://api.github.com/users/planeswalkers/following{/other_user}","gists_url":"https://api.github.com/users/planeswalkers/gists{/gist_id}","starred_url":"https://api.github.com/users/planeswalkers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/planeswalkers/subscriptions","organizations_url":"https://api.github.com/users/planeswalkers/orgs","repos_url":"https://api.github.com/users/planeswalkers/repos","events_url":"https://api.github.com/users/planeswalkers/events{/privacy}","received_events_url":"https://api.github.com/users/planeswalkers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/planeswalkers/CSharpMtgDb.Info","description":"C# driver for api.mtgdb.info","fork":false,"url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info","forks_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/forks","keys_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/keys{/key_id}","collaborators_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/teams","hooks_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/hooks","issue_events_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/issues/events{/number}","events_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/events","assignees_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/assignees{/user}","branches_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/branches{/branch}","tags_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/tags","blobs_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/git/refs{/sha}","trees_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/git/trees{/sha}","statuses_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/statuses/{sha}","languages_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/languages","stargazers_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/stargazers","contributors_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/contributors","subscribers_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/subscribers","subscription_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/subscription","commits_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/commits{/sha}","git_commits_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/git/commits{/sha}","comments_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/comments{/number}","issue_comment_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/issues/comments/{number}","contents_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/contents/{+path}","compare_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/compare/{base}...{head}","merges_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/merges","archive_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/downloads","issues_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/issues{/number}","pulls_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/pulls{/number}","milestones_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/milestones{/number}","notifications_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/labels{/name}","releases_url":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/releases{/id}","created_at":"2014-03-04T18:25:32Z","updated_at":"2014-08-16T17:18:52Z","pushed_at":"2014-07-03T15:22:47Z","git_url":"git://github.com/planeswalkers/CSharpMtgDb.Info.git","ssh_url":"git@github.com:planeswalkers/CSharpMtgDb.Info.git","clone_url":"https://github.com/planeswalkers/CSharpMtgDb.Info.git","svn_url":"https://github.com/planeswalkers/CSharpMtgDb.Info","homepage":"https://www.mtgdb.info","size":283,"stargazers_count":2,"watchers_count":2,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3,"mirror_url":null,"open_issues_count":4,"forks":3,"open_issues":4,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/pulls/12"},"html":{"href":"https://github.com/planeswalkers/CSharpMtgDb.Info/pull/12"},"issue":{"href":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/issues/12"},"comments":{"href":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/planeswalkers/CSharpMtgDb.Info/statuses/6a18862847c0b209c9aff6fbcfb176555dbea94a"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":314,"deletions":401,"changed_files":3}}