{"action":"created","comment":{"url":"https://api.github.com/repos/geftimov/LolMatch-android/pulls/comments/29406476","id":29406476,"diff_hunk":"@@ -17,11 +40,56 @@ public static Fragment getInstance() {\n \n     @Override\n     public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n-        return inflater.inflate(R.layout.fragment_main, container, false);\n+        final View rootview = inflater.inflate(R.layout.fragment_main, container, false);\n+        ButterKnife.inject(this, rootview);\n+        return rootview;\n     }\n \n     @Override\n     public void onViewCreated(View view, Bundle savedInstanceState) {\n         super.onViewCreated(view, savedInstanceState);\n     }\n+\n+    @OnClick(R.id.loginButton)\n+    public void onLoginButtonClick(final Button button) {\n+        final String summonerName = summonerNameEditText.getText().toString();\n+        final String summonerRegion = summonerRegionEditText.getText().toString();\n+\n+        if (!summonerName.isEmpty() && !summonerRegion.isEmpty()\n+                && isRegionValid(summonerRegion)) {\n+            OrianaLolService.getInstance().getSummonerByName(summonerName, summonerRegion);\n+            return;\n+        }\n+\n+        final AlertDialog.Builder builder =\n+                new AlertDialog.Builder(getActivity());\n+        builder.setTitle(\"Error\");\n+        builder.setMessage(\"Please enter username and region\");\n+        builder.setPositiveButton(\"OK\", null);\n+        builder.show();\n+    }\n+\n+    @Subscribe\n+    public void onLoginSuccess(final LoginSuccessEvent loginSuccessEvent) {\n+        final Summoner summoner = loginSuccessEvent.getSummoner();\n+        Toast.makeText(getActivity(), summoner.getName() + \" \" + summoner.getLevel() + \" level\", Toast.LENGTH_LONG).show();\n+    }\n+\n+    @Subscribe\n+    public void onLoginError(final LoginErrorEvent loginErrorEvent) {\n+        final AlertDialog.Builder builder =\n+                new AlertDialog.Builder(getActivity());","path":"app/src/main/java/com/eftimoff/lolmatch/fragment/LoginFragment.java","position":81,"original_position":81,"commit_id":"4406615b7e5aa455147746d308bd1814dffea7e0","original_commit_id":"4406615b7e5aa455147746d308bd1814dffea7e0","user":{"login":"geftimov","id":2619500,"avatar_url":"https://avatars.githubusercontent.com/u/2619500?v=3","gravatar_id":"","url":"https://api.github.com/users/geftimov","html_url":"https://github.com/geftimov","followers_url":"https://api.github.com/users/geftimov/followers","following_url":"https://api.github.com/users/geftimov/following{/other_user}","gists_url":"https://api.github.com/users/geftimov/gists{/gist_id}","starred_url":"https://api.github.com/users/geftimov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geftimov/subscriptions","organizations_url":"https://api.github.com/users/geftimov/orgs","repos_url":"https://api.github.com/users/geftimov/repos","events_url":"https://api.github.com/users/geftimov/events{/privacy}","received_events_url":"https://api.github.com/users/geftimov/received_events","type":"User","site_admin":false},"body":"Because it is made here again.","created_at":"2015-04-30T06:35:52Z","updated_at":"2015-04-30T06:35:52Z","html_url":"https://github.com/geftimov/LolMatch-android/pull/3#discussion_r29406476","pull_request_url":"https://api.github.com/repos/geftimov/LolMatch-android/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/geftimov/LolMatch-android/pulls/comments/29406476"},"html":{"href":"https://github.com/geftimov/LolMatch-android/pull/3#discussion_r29406476"},"pull_request":{"href":"https://api.github.com/repos/geftimov/LolMatch-android/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/geftimov/LolMatch-android/pulls/3","id":34415548,"html_url":"https://github.com/geftimov/LolMatch-android/pull/3","diff_url":"https://github.com/geftimov/LolMatch-android/pull/3.diff","patch_url":"https://github.com/geftimov/LolMatch-android/pull/3.patch","issue_url":"https://api.github.com/repos/geftimov/LolMatch-android/issues/3","number":3,"state":"open","locked":false,"title":"Feature/login functionality","user":{"login":"martinVitanov","id":8222771,"avatar_url":"https://avatars.githubusercontent.com/u/8222771?v=3","gravatar_id":"","url":"https://api.github.com/users/martinVitanov","html_url":"https://github.com/martinVitanov","followers_url":"https://api.github.com/users/martinVitanov/followers","following_url":"https://api.github.com/users/martinVitanov/following{/other_user}","gists_url":"https://api.github.com/users/martinVitanov/gists{/gist_id}","starred_url":"https://api.github.com/users/martinVitanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinVitanov/subscriptions","organizations_url":"https://api.github.com/users/martinVitanov/orgs","repos_url":"https://api.github.com/users/martinVitanov/repos","events_url":"https://api.github.com/users/martinVitanov/events{/privacy}","received_events_url":"https://api.github.com/users/martinVitanov/received_events","type":"User","site_admin":false},"body":"As user I want to see if my username is not correct and try again to login.","created_at":"2015-04-29T23:17:43Z","updated_at":"2015-04-30T06:35:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b19f86d02f248a0c4fce21a77b20d88b4436e9d4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/geftimov/LolMatch-android/pulls/3/commits","review_comments_url":"https://api.github.com/repos/geftimov/LolMatch-android/pulls/3/comments","review_comment_url":"https://api.github.com/repos/geftimov/LolMatch-android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/geftimov/LolMatch-android/issues/3/comments","statuses_url":"https://api.github.com/repos/geftimov/LolMatch-android/statuses/4406615b7e5aa455147746d308bd1814dffea7e0","head":{"label":"geftimov:feature/loginFunctionality","ref":"feature/loginFunctionality","sha":"4406615b7e5aa455147746d308bd1814dffea7e0","user":{"login":"geftimov","id":2619500,"avatar_url":"https://avatars.githubusercontent.com/u/2619500?v=3","gravatar_id":"","url":"https://api.github.com/users/geftimov","html_url":"https://github.com/geftimov","followers_url":"https://api.github.com/users/geftimov/followers","following_url":"https://api.github.com/users/geftimov/following{/other_user}","gists_url":"https://api.github.com/users/geftimov/gists{/gist_id}","starred_url":"https://api.github.com/users/geftimov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geftimov/subscriptions","organizations_url":"https://api.github.com/users/geftimov/orgs","repos_url":"https://api.github.com/users/geftimov/repos","events_url":"https://api.github.com/users/geftimov/events{/privacy}","received_events_url":"https://api.github.com/users/geftimov/received_events","type":"User","site_admin":false},"repo":{"id":34202989,"name":"LolMatch-android","full_name":"geftimov/LolMatch-android","owner":{"login":"geftimov","id":2619500,"avatar_url":"https://avatars.githubusercontent.com/u/2619500?v=3","gravatar_id":"","url":"https://api.github.com/users/geftimov","html_url":"https://github.com/geftimov","followers_url":"https://api.github.com/users/geftimov/followers","following_url":"https://api.github.com/users/geftimov/following{/other_user}","gists_url":"https://api.github.com/users/geftimov/gists{/gist_id}","starred_url":"https://api.github.com/users/geftimov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geftimov/subscriptions","organizations_url":"https://api.github.com/users/geftimov/orgs","repos_url":"https://api.github.com/users/geftimov/repos","events_url":"https://api.github.com/users/geftimov/events{/privacy}","received_events_url":"https://api.github.com/users/geftimov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/geftimov/LolMatch-android","description":"Android application related to League of Legends","fork":false,"url":"https://api.github.com/repos/geftimov/LolMatch-android","forks_url":"https://api.github.com/repos/geftimov/LolMatch-android/forks","keys_url":"https://api.github.com/repos/geftimov/LolMatch-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geftimov/LolMatch-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geftimov/LolMatch-android/teams","hooks_url":"https://api.github.com/repos/geftimov/LolMatch-android/hooks","issue_events_url":"https://api.github.com/repos/geftimov/LolMatch-android/issues/events{/number}","events_url":"https://api.github.com/repos/geftimov/LolMatch-android/events","assignees_url":"https://api.github.com/repos/geftimov/LolMatch-android/assignees{/user}","branches_url":"https://api.github.com/repos/geftimov/LolMatch-android/branches{/branch}","tags_url":"https://api.github.com/repos/geftimov/LolMatch-android/tags","blobs_url":"https://api.github.com/repos/geftimov/LolMatch-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geftimov/LolMatch-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geftimov/LolMatch-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/geftimov/LolMatch-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geftimov/LolMatch-android/statuses/{sha}","languages_url":"https://api.github.com/repos/geftimov/LolMatch-android/languages","stargazers_url":"https://api.github.com/repos/geftimov/LolMatch-android/stargazers","contributors_url":"https://api.github.com/repos/geftimov/LolMatch-android/contributors","subscribers_url":"https://api.github.com/repos/geftimov/LolMatch-android/subscribers","subscription_url":"https://api.github.com/repos/geftimov/LolMatch-android/subscription","commits_url":"https://api.github.com/repos/geftimov/LolMatch-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/geftimov/LolMatch-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/geftimov/LolMatch-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/geftimov/LolMatch-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/geftimov/LolMatch-android/contents/{+path}","compare_url":"https://api.github.com/repos/geftimov/LolMatch-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geftimov/LolMatch-android/merges","archive_url":"https://api.github.com/repos/geftimov/LolMatch-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geftimov/LolMatch-android/downloads","issues_url":"https://api.github.com/repos/geftimov/LolMatch-android/issues{/number}","pulls_url":"https://api.github.com/repos/geftimov/LolMatch-android/pulls{/number}","milestones_url":"https://api.github.com/repos/geftimov/LolMatch-android/milestones{/number}","notifications_url":"https://api.github.com/repos/geftimov/LolMatch-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geftimov/LolMatch-android/labels{/name}","releases_url":"https://api.github.com/repos/geftimov/LolMatch-android/releases{/id}","created_at":"2015-04-19T10:51:56Z","updated_at":"2015-04-29T21:37:42Z","pushed_at":"2015-04-29T23:17:44Z","git_url":"git://github.com/geftimov/LolMatch-android.git","ssh_url":"git@github.com:geftimov/LolMatch-android.git","clone_url":"https://github.com/geftimov/LolMatch-android.git","svn_url":"https://github.com/geftimov/LolMatch-android","homepage":null,"size":272,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"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":"geftimov:master","ref":"master","sha":"4733c181f6a37fa2b855f624986c6314d8c92421","user":{"login":"geftimov","id":2619500,"avatar_url":"https://avatars.githubusercontent.com/u/2619500?v=3","gravatar_id":"","url":"https://api.github.com/users/geftimov","html_url":"https://github.com/geftimov","followers_url":"https://api.github.com/users/geftimov/followers","following_url":"https://api.github.com/users/geftimov/following{/other_user}","gists_url":"https://api.github.com/users/geftimov/gists{/gist_id}","starred_url":"https://api.github.com/users/geftimov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geftimov/subscriptions","organizations_url":"https://api.github.com/users/geftimov/orgs","repos_url":"https://api.github.com/users/geftimov/repos","events_url":"https://api.github.com/users/geftimov/events{/privacy}","received_events_url":"https://api.github.com/users/geftimov/received_events","type":"User","site_admin":false},"repo":{"id":34202989,"name":"LolMatch-android","full_name":"geftimov/LolMatch-android","owner":{"login":"geftimov","id":2619500,"avatar_url":"https://avatars.githubusercontent.com/u/2619500?v=3","gravatar_id":"","url":"https://api.github.com/users/geftimov","html_url":"https://github.com/geftimov","followers_url":"https://api.github.com/users/geftimov/followers","following_url":"https://api.github.com/users/geftimov/following{/other_user}","gists_url":"https://api.github.com/users/geftimov/gists{/gist_id}","starred_url":"https://api.github.com/users/geftimov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geftimov/subscriptions","organizations_url":"https://api.github.com/users/geftimov/orgs","repos_url":"https://api.github.com/users/geftimov/repos","events_url":"https://api.github.com/users/geftimov/events{/privacy}","received_events_url":"https://api.github.com/users/geftimov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/geftimov/LolMatch-android","description":"Android application related to League of Legends","fork":false,"url":"https://api.github.com/repos/geftimov/LolMatch-android","forks_url":"https://api.github.com/repos/geftimov/LolMatch-android/forks","keys_url":"https://api.github.com/repos/geftimov/LolMatch-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geftimov/LolMatch-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geftimov/LolMatch-android/teams","hooks_url":"https://api.github.com/repos/geftimov/LolMatch-android/hooks","issue_events_url":"https://api.github.com/repos/geftimov/LolMatch-android/issues/events{/number}","events_url":"https://api.github.com/repos/geftimov/LolMatch-android/events","assignees_url":"https://api.github.com/repos/geftimov/LolMatch-android/assignees{/user}","branches_url":"https://api.github.com/repos/geftimov/LolMatch-android/branches{/branch}","tags_url":"https://api.github.com/repos/geftimov/LolMatch-android/tags","blobs_url":"https://api.github.com/repos/geftimov/LolMatch-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geftimov/LolMatch-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geftimov/LolMatch-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/geftimov/LolMatch-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geftimov/LolMatch-android/statuses/{sha}","languages_url":"https://api.github.com/repos/geftimov/LolMatch-android/languages","stargazers_url":"https://api.github.com/repos/geftimov/LolMatch-android/stargazers","contributors_url":"https://api.github.com/repos/geftimov/LolMatch-android/contributors","subscribers_url":"https://api.github.com/repos/geftimov/LolMatch-android/subscribers","subscription_url":"https://api.github.com/repos/geftimov/LolMatch-android/subscription","commits_url":"https://api.github.com/repos/geftimov/LolMatch-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/geftimov/LolMatch-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/geftimov/LolMatch-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/geftimov/LolMatch-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/geftimov/LolMatch-android/contents/{+path}","compare_url":"https://api.github.com/repos/geftimov/LolMatch-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geftimov/LolMatch-android/merges","archive_url":"https://api.github.com/repos/geftimov/LolMatch-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geftimov/LolMatch-android/downloads","issues_url":"https://api.github.com/repos/geftimov/LolMatch-android/issues{/number}","pulls_url":"https://api.github.com/repos/geftimov/LolMatch-android/pulls{/number}","milestones_url":"https://api.github.com/repos/geftimov/LolMatch-android/milestones{/number}","notifications_url":"https://api.github.com/repos/geftimov/LolMatch-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geftimov/LolMatch-android/labels{/name}","releases_url":"https://api.github.com/repos/geftimov/LolMatch-android/releases{/id}","created_at":"2015-04-19T10:51:56Z","updated_at":"2015-04-29T21:37:42Z","pushed_at":"2015-04-29T23:17:44Z","git_url":"git://github.com/geftimov/LolMatch-android.git","ssh_url":"git@github.com:geftimov/LolMatch-android.git","clone_url":"https://github.com/geftimov/LolMatch-android.git","svn_url":"https://github.com/geftimov/LolMatch-android","homepage":null,"size":272,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"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/geftimov/LolMatch-android/pulls/3"},"html":{"href":"https://github.com/geftimov/LolMatch-android/pull/3"},"issue":{"href":"https://api.github.com/repos/geftimov/LolMatch-android/issues/3"},"comments":{"href":"https://api.github.com/repos/geftimov/LolMatch-android/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/geftimov/LolMatch-android/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/geftimov/LolMatch-android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/geftimov/LolMatch-android/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/geftimov/LolMatch-android/statuses/4406615b7e5aa455147746d308bd1814dffea7e0"}}}}