{"action":"created","comment":{"url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/pulls/comments/107039948","pull_request_review_id":27989557,"id":107039948,"diff_hunk":"@@ -1,24 +1,98 @@\n package org.ieeeguc.ieeeguc.fragments.user;\r\n-\r\n-\r\n import android.os.Bundle;\r\n import android.support.v4.app.Fragment;\r\n import android.view.LayoutInflater;\r\n import android.view.View;\r\n import android.view.ViewGroup;\r\n-\r\n+import android.widget.TextView;\r\n+import org.ieeeguc.ieeeguc.HTTPResponse;\r\n import org.ieeeguc.ieeeguc.R;\r\n+import org.ieeeguc.ieeeguc.controllers.MainActivity;\r\n+import org.json.JSONObject;\r\n+\r\n \r\n /**\r\n  * A simple {@link Fragment} subclass.\r\n  */\r\n public class UserShow extends Fragment {\r\n \r\n+    int id=0;\r\n+    String type=\"\";\r\n+    String first_name=\"\";\r\n+    String last_name=\"\";\r\n+    String email=\"\";\r\n+    String gender=\"\";\r\n+    String phone_number=\"\";\r\n+    String birthdate=\"\";\r\n+    int IEEE_membership_ID=0;\r\n+    //JSONObject settings ;\r\n+\r\n+\r\n     @Override\r\n     public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n                              Bundle savedInstanceState) {\r\n         // Inflate the layout for this fragment\r\n-        return inflater.inflate(R.layout.fragment_user_show, container, false);\r\n+\r\n+\r\n+        final View view = inflater.inflate(R.layout.fragment_user_show, container, false);\r\n+        MainActivity.loggedInUser.getUser(MainActivity.token,MainActivity.loggedInUser.getId(), new HTTPResponse() {\r\n+            @Override\r\n+            public void onSuccess(int statusCode, JSONObject body) {\r\n+                try {\r\n+                    JSONObject j = body.getJSONObject(\"result\");\r\n+                    id = j.getInt(\"id\");\r\n+                    type = j.getString(\"type\");\r\n+                    first_name  = j.getString(\"first_name\");\r\n+                    last_name = j.getString(\"last_name\");\r\n+                    email = j.getString(\"email\");\r\n+                    gender = j.getString(\"gender\");\r\n+                    phone_number = j.getString(\"phone_number\");\r\n+                    birthdate = j.getString(\"birthdate\");\r\n+                    IEEE_membership_ID = j.getInt(\"IEEE_membership_ID\");\r\n+                    //settings = j.getJSONObject(\"setting\");\r\n+\r\n+\r\n+\r\n+\r\n+                } catch (Exception e) {\r\n+\r\n+                    MainActivity.createSnackBar(getString(R.string.error_server_down));\r\n+                }\r\n+\r\n+                ((TextView) view.findViewById(R.id.name)).setText(first_name+\" \"+last_name);\r\n+                ((TextView) view.findViewById(R.id.email)).setText(email);\r\n+                ((TextView) view.findViewById(R.id.id)).setText(id+\"\");\r\n+                ((TextView) view.findViewById(R.id.ieeemsh_id)).setText(IEEE_membership_ID+\"\");\r\n+                ((TextView) view.findViewById(R.id.phone)).setText(phone_number);\r\n+                ((TextView) view.findViewById(R.id.type)).setText(type);\r\n+\r\n+                ((TextView) view.findViewById(R.id.bdate)).setText(birthdate);\r\n+                ((TextView) view.findViewById(R.id.gender)).setText(gender);\r\n+            }\r\n+\r\n+            @Override\r\n+            public void onFailure(int statusCode, JSONObject body) {\r\n+\r\n+                if(statusCode == 401) {\r\n+                    MainActivity.logout();\r\n+                }\r\n+                else if(statusCode == 400)\r\n+                {\r\n+                    //don't remember which message\r","path":"app/src/main/java/org/ieeeguc/ieeeguc/fragments/user/UserShow.java","position":85,"original_position":85,"commit_id":"da15c4c5ded71ca578d7a783018ac6e0d322cb65","original_commit_id":"da15c4c5ded71ca578d7a783018ac6e0d322cb65","user":{"login":"KEMDAK","id":16259349,"avatar_url":"https://avatars0.githubusercontent.com/u/16259349?v=3","gravatar_id":"","url":"https://api.github.com/users/KEMDAK","html_url":"https://github.com/KEMDAK","followers_url":"https://api.github.com/users/KEMDAK/followers","following_url":"https://api.github.com/users/KEMDAK/following{/other_user}","gists_url":"https://api.github.com/users/KEMDAK/gists{/gist_id}","starred_url":"https://api.github.com/users/KEMDAK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KEMDAK/subscriptions","organizations_url":"https://api.github.com/users/KEMDAK/orgs","repos_url":"https://api.github.com/users/KEMDAK/repos","events_url":"https://api.github.com/users/KEMDAK/events{/privacy}","received_events_url":"https://api.github.com/users/KEMDAK/received_events","type":"User","site_admin":false},"body":"in this controller if you got 400 that means that the application set the id wrong and in this case the user should get a server error message as it is not his fault","created_at":"2017-03-20T23:14:41Z","updated_at":"2017-03-20T23:19:31Z","html_url":"https://github.com/KEMDAK/IEEEGUCSB-System_Andriod/pull/17#discussion_r107039948","pull_request_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/pulls/comments/107039948"},"html":{"href":"https://github.com/KEMDAK/IEEEGUCSB-System_Andriod/pull/17#discussion_r107039948"},"pull_request":{"href":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/pulls/17","id":107069756,"html_url":"https://github.com/KEMDAK/IEEEGUCSB-System_Andriod/pull/17","diff_url":"https://github.com/KEMDAK/IEEEGUCSB-System_Andriod/pull/17.diff","patch_url":"https://github.com/KEMDAK/IEEEGUCSB-System_Andriod/pull/17.patch","issue_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/issues/17","number":17,"state":"open","locked":false,"title":"add committee","user":{"login":"rehamayman96","id":25254134,"avatar_url":"https://avatars0.githubusercontent.com/u/25254134?v=3","gravatar_id":"","url":"https://api.github.com/users/rehamayman96","html_url":"https://github.com/rehamayman96","followers_url":"https://api.github.com/users/rehamayman96/followers","following_url":"https://api.github.com/users/rehamayman96/following{/other_user}","gists_url":"https://api.github.com/users/rehamayman96/gists{/gist_id}","starred_url":"https://api.github.com/users/rehamayman96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rehamayman96/subscriptions","organizations_url":"https://api.github.com/users/rehamayman96/orgs","repos_url":"https://api.github.com/users/rehamayman96/repos","events_url":"https://api.github.com/users/rehamayman96/events{/privacy}","received_events_url":"https://api.github.com/users/rehamayman96/received_events","type":"User","site_admin":false},"body":"tested and working ","created_at":"2017-02-20T20:10:48Z","updated_at":"2017-03-20T23:19:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d7d46068d2aaf2405daf72e34d75e7d1f730d5ce","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/pulls/17/commits","review_comments_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/pulls/17/comments","review_comment_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/pulls/comments{/number}","comments_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/issues/17/comments","statuses_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/statuses/da15c4c5ded71ca578d7a783018ac6e0d322cb65","head":{"label":"KEMDAK:Reham","ref":"Reham","sha":"da15c4c5ded71ca578d7a783018ac6e0d322cb65","user":{"login":"KEMDAK","id":16259349,"avatar_url":"https://avatars0.githubusercontent.com/u/16259349?v=3","gravatar_id":"","url":"https://api.github.com/users/KEMDAK","html_url":"https://github.com/KEMDAK","followers_url":"https://api.github.com/users/KEMDAK/followers","following_url":"https://api.github.com/users/KEMDAK/following{/other_user}","gists_url":"https://api.github.com/users/KEMDAK/gists{/gist_id}","starred_url":"https://api.github.com/users/KEMDAK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KEMDAK/subscriptions","organizations_url":"https://api.github.com/users/KEMDAK/orgs","repos_url":"https://api.github.com/users/KEMDAK/repos","events_url":"https://api.github.com/users/KEMDAK/events{/privacy}","received_events_url":"https://api.github.com/users/KEMDAK/received_events","type":"User","site_admin":false},"repo":{"id":79852713,"name":"IEEEGUCSB-System_Andriod","full_name":"KEMDAK/IEEEGUCSB-System_Andriod","owner":{"login":"KEMDAK","id":16259349,"avatar_url":"https://avatars0.githubusercontent.com/u/16259349?v=3","gravatar_id":"","url":"https://api.github.com/users/KEMDAK","html_url":"https://github.com/KEMDAK","followers_url":"https://api.github.com/users/KEMDAK/followers","following_url":"https://api.github.com/users/KEMDAK/following{/other_user}","gists_url":"https://api.github.com/users/KEMDAK/gists{/gist_id}","starred_url":"https://api.github.com/users/KEMDAK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KEMDAK/subscriptions","organizations_url":"https://api.github.com/users/KEMDAK/orgs","repos_url":"https://api.github.com/users/KEMDAK/repos","events_url":"https://api.github.com/users/KEMDAK/events{/privacy}","received_events_url":"https://api.github.com/users/KEMDAK/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/KEMDAK/IEEEGUCSB-System_Andriod","description":"This is a front end Android application that serves as a client for IEEE GUC System","fork":false,"url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod","forks_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/forks","keys_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/teams","hooks_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/hooks","issue_events_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/issues/events{/number}","events_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/events","assignees_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/assignees{/user}","branches_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/branches{/branch}","tags_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/tags","blobs_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/git/refs{/sha}","trees_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/statuses/{sha}","languages_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/languages","stargazers_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/stargazers","contributors_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/contributors","subscribers_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/subscribers","subscription_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/subscription","commits_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/commits{/sha}","git_commits_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/git/commits{/sha}","comments_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/comments{/number}","issue_comment_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/issues/comments{/number}","contents_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/contents/{+path}","compare_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/merges","archive_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/downloads","issues_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/issues{/number}","pulls_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/pulls{/number}","milestones_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/milestones{/number}","notifications_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/labels{/name}","releases_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/releases{/id}","deployments_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/deployments","created_at":"2017-01-23T22:01:01Z","updated_at":"2017-01-23T22:18:40Z","pushed_at":"2017-03-20T23:01:17Z","git_url":"git://github.com/KEMDAK/IEEEGUCSB-System_Andriod.git","ssh_url":"git@github.com:KEMDAK/IEEEGUCSB-System_Andriod.git","clone_url":"https://github.com/KEMDAK/IEEEGUCSB-System_Andriod.git","svn_url":"https://github.com/KEMDAK/IEEEGUCSB-System_Andriod","homepage":null,"size":478,"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":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"KEMDAK:dev","ref":"dev","sha":"15ce818ee55660ac332f5c546a494e995f425936","user":{"login":"KEMDAK","id":16259349,"avatar_url":"https://avatars0.githubusercontent.com/u/16259349?v=3","gravatar_id":"","url":"https://api.github.com/users/KEMDAK","html_url":"https://github.com/KEMDAK","followers_url":"https://api.github.com/users/KEMDAK/followers","following_url":"https://api.github.com/users/KEMDAK/following{/other_user}","gists_url":"https://api.github.com/users/KEMDAK/gists{/gist_id}","starred_url":"https://api.github.com/users/KEMDAK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KEMDAK/subscriptions","organizations_url":"https://api.github.com/users/KEMDAK/orgs","repos_url":"https://api.github.com/users/KEMDAK/repos","events_url":"https://api.github.com/users/KEMDAK/events{/privacy}","received_events_url":"https://api.github.com/users/KEMDAK/received_events","type":"User","site_admin":false},"repo":{"id":79852713,"name":"IEEEGUCSB-System_Andriod","full_name":"KEMDAK/IEEEGUCSB-System_Andriod","owner":{"login":"KEMDAK","id":16259349,"avatar_url":"https://avatars0.githubusercontent.com/u/16259349?v=3","gravatar_id":"","url":"https://api.github.com/users/KEMDAK","html_url":"https://github.com/KEMDAK","followers_url":"https://api.github.com/users/KEMDAK/followers","following_url":"https://api.github.com/users/KEMDAK/following{/other_user}","gists_url":"https://api.github.com/users/KEMDAK/gists{/gist_id}","starred_url":"https://api.github.com/users/KEMDAK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KEMDAK/subscriptions","organizations_url":"https://api.github.com/users/KEMDAK/orgs","repos_url":"https://api.github.com/users/KEMDAK/repos","events_url":"https://api.github.com/users/KEMDAK/events{/privacy}","received_events_url":"https://api.github.com/users/KEMDAK/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/KEMDAK/IEEEGUCSB-System_Andriod","description":"This is a front end Android application that serves as a client for IEEE GUC System","fork":false,"url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod","forks_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/forks","keys_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/teams","hooks_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/hooks","issue_events_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/issues/events{/number}","events_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/events","assignees_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/assignees{/user}","branches_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/branches{/branch}","tags_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/tags","blobs_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/git/refs{/sha}","trees_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/statuses/{sha}","languages_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/languages","stargazers_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/stargazers","contributors_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/contributors","subscribers_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/subscribers","subscription_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/subscription","commits_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/commits{/sha}","git_commits_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/git/commits{/sha}","comments_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/comments{/number}","issue_comment_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/issues/comments{/number}","contents_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/contents/{+path}","compare_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/merges","archive_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/downloads","issues_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/issues{/number}","pulls_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/pulls{/number}","milestones_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/milestones{/number}","notifications_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/labels{/name}","releases_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/releases{/id}","deployments_url":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/deployments","created_at":"2017-01-23T22:01:01Z","updated_at":"2017-01-23T22:18:40Z","pushed_at":"2017-03-20T23:01:17Z","git_url":"git://github.com/KEMDAK/IEEEGUCSB-System_Andriod.git","ssh_url":"git@github.com:KEMDAK/IEEEGUCSB-System_Andriod.git","clone_url":"https://github.com/KEMDAK/IEEEGUCSB-System_Andriod.git","svn_url":"https://github.com/KEMDAK/IEEEGUCSB-System_Andriod","homepage":null,"size":478,"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":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/pulls/17"},"html":{"href":"https://github.com/KEMDAK/IEEEGUCSB-System_Andriod/pull/17"},"issue":{"href":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/issues/17"},"comments":{"href":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/KEMDAK/IEEEGUCSB-System_Andriod/statuses/da15c4c5ded71ca578d7a783018ac6e0d322cb65"}}}}
{"actor":{"display_login":"KEMDAK"}}