{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/fels_99/pulls/comments/48464862","id":48464862,"diff_hunk":"@@ -0,0 +1,119 @@\n+package com.framgia.elsytem;\n+\n+import android.app.ProgressDialog;\n+import android.os.AsyncTask;\n+import android.os.Bundle;\n+import android.support.v7.app.AppCompatActivity;\n+import android.support.v7.widget.Toolbar;\n+import android.util.Log;\n+import android.widget.ListView;\n+import android.widget.TextView;\n+\n+import com.framgia.elsytem.jsonResponse.CategoryResponse;\n+import com.framgia.elsytem.mypackage.SessionManager;\n+import com.google.gson.Gson;\n+import com.squareup.okhttp.MediaType;\n+import com.squareup.okhttp.OkHttpClient;\n+import com.squareup.okhttp.Request;\n+import com.squareup.okhttp.RequestBody;\n+import com.squareup.okhttp.Response;\n+\n+import org.json.JSONException;\n+import org.json.JSONObject;\n+\n+import java.io.IOException;\n+import java.util.ArrayList;\n+import java.util.HashMap;\n+\n+public class CategoriesActivity extends AppCompatActivity {\n+    ListView list;\n+    CategoryResponse categoryResponse;\n+    CategoryAdapter categoryAdapter;\n+    String url = \"\";\n+    Gson gson;\n+    TextView category;\n+    private com.framgia.elsytem.mypackage.Constants mConstant;\n+    public static final MediaType JSON = MediaType.parse(\"application/json;charset=utf-8\");\n+    OkHttpClient okHttpClient;\n+    String token;\n+    SessionManager sessionManager;\n+    HashMap<String, String> user;\n+    ArrayList<CategoryResponse.CategoriesEntity> categoriesName = new ArrayList<CategoryResponse.CategoriesEntity>();\n+    String cat;\n+\n+    @Override\n+    protected void onCreate(Bundle savedInstanceState) {\n+        super.onCreate(savedInstanceState);\n+        setContentView(R.layout.activity_categories);\n+        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);\n+        setSupportActionBar(toolbar);\n+        sessionManager = new SessionManager(this);\n+        user = sessionManager.getUserDetails();\n+        token = user.get(mConstant.KEY_AUTH_TOKEN);\n+        category = (TextView) findViewById(R.id.textHeader);\n+        list = (ListView) findViewById(R.id.listCategory);\n+        okHttpClient = new OkHttpClient();\n+        new HttpAsyncCategory().execute(\"https://manh-nt.herokuapp.com/categories.json?auth_token=\" + user.get(mConstant.KEY_AUTH_TOKEN));","path":"app/src/main/java/com/framgia/elsytem/CategoriesActivity.java","position":56,"original_position":56,"commit_id":"528c42b3dbaa249e47363f08a139ea9de8499e70","original_commit_id":"528c42b3dbaa249e47363f08a139ea9de8499e70","user":{"login":"nvmanh","id":2127662,"avatar_url":"https://avatars.githubusercontent.com/u/2127662?v=3","gravatar_id":"","url":"https://api.github.com/users/nvmanh","html_url":"https://github.com/nvmanh","followers_url":"https://api.github.com/users/nvmanh/followers","following_url":"https://api.github.com/users/nvmanh/following{/other_user}","gists_url":"https://api.github.com/users/nvmanh/gists{/gist_id}","starred_url":"https://api.github.com/users/nvmanh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nvmanh/subscriptions","organizations_url":"https://api.github.com/users/nvmanh/orgs","repos_url":"https://api.github.com/users/nvmanh/repos","events_url":"https://api.github.com/users/nvmanh/events{/privacy}","received_events_url":"https://api.github.com/users/nvmanh/received_events","type":"User","site_admin":false},"body":"constant please","created_at":"2015-12-28T06:44:12Z","updated_at":"2015-12-28T06:44:12Z","html_url":"https://github.com/framgia/fels_99/pull/21#discussion_r48464862","pull_request_url":"https://api.github.com/repos/framgia/fels_99/pulls/21","_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_99/pulls/comments/48464862"},"html":{"href":"https://github.com/framgia/fels_99/pull/21#discussion_r48464862"},"pull_request":{"href":"https://api.github.com/repos/framgia/fels_99/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/fels_99/pulls/21","id":54633569,"html_url":"https://github.com/framgia/fels_99/pull/21","diff_url":"https://github.com/framgia/fels_99/pull/21.diff","patch_url":"https://github.com/framgia/fels_99/pull/21.patch","issue_url":"https://api.github.com/repos/framgia/fels_99/issues/21","number":21,"state":"open","locked":false,"title":"48090 gui categories backend","user":{"login":"shawon-sharma","id":15901538,"avatar_url":"https://avatars.githubusercontent.com/u/15901538?v=3","gravatar_id":"","url":"https://api.github.com/users/shawon-sharma","html_url":"https://github.com/shawon-sharma","followers_url":"https://api.github.com/users/shawon-sharma/followers","following_url":"https://api.github.com/users/shawon-sharma/following{/other_user}","gists_url":"https://api.github.com/users/shawon-sharma/gists{/gist_id}","starred_url":"https://api.github.com/users/shawon-sharma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shawon-sharma/subscriptions","organizations_url":"https://api.github.com/users/shawon-sharma/orgs","repos_url":"https://api.github.com/users/shawon-sharma/repos","events_url":"https://api.github.com/users/shawon-sharma/events{/privacy}","received_events_url":"https://api.github.com/users/shawon-sharma/received_events","type":"User","site_admin":false},"body":"Here i have just fetch the categories name wit id","created_at":"2015-12-28T05:53:27Z","updated_at":"2015-12-28T06:44:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b3d6451afa0af6df3e3f9e53a335ce9f46f6faa5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/framgia/fels_99/pulls/21/commits","review_comments_url":"https://api.github.com/repos/framgia/fels_99/pulls/21/comments","review_comment_url":"https://api.github.com/repos/framgia/fels_99/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/fels_99/issues/21/comments","statuses_url":"https://api.github.com/repos/framgia/fels_99/statuses/528c42b3dbaa249e47363f08a139ea9de8499e70","head":{"label":"shawon-sharma:48090_gui_categories_backend","ref":"48090_gui_categories_backend","sha":"528c42b3dbaa249e47363f08a139ea9de8499e70","user":{"login":"shawon-sharma","id":15901538,"avatar_url":"https://avatars.githubusercontent.com/u/15901538?v=3","gravatar_id":"","url":"https://api.github.com/users/shawon-sharma","html_url":"https://github.com/shawon-sharma","followers_url":"https://api.github.com/users/shawon-sharma/followers","following_url":"https://api.github.com/users/shawon-sharma/following{/other_user}","gists_url":"https://api.github.com/users/shawon-sharma/gists{/gist_id}","starred_url":"https://api.github.com/users/shawon-sharma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shawon-sharma/subscriptions","organizations_url":"https://api.github.com/users/shawon-sharma/orgs","repos_url":"https://api.github.com/users/shawon-sharma/repos","events_url":"https://api.github.com/users/shawon-sharma/events{/privacy}","received_events_url":"https://api.github.com/users/shawon-sharma/received_events","type":"User","site_admin":false},"repo":{"id":47607757,"name":"fels_99","full_name":"shawon-sharma/fels_99","owner":{"login":"shawon-sharma","id":15901538,"avatar_url":"https://avatars.githubusercontent.com/u/15901538?v=3","gravatar_id":"","url":"https://api.github.com/users/shawon-sharma","html_url":"https://github.com/shawon-sharma","followers_url":"https://api.github.com/users/shawon-sharma/followers","following_url":"https://api.github.com/users/shawon-sharma/following{/other_user}","gists_url":"https://api.github.com/users/shawon-sharma/gists{/gist_id}","starred_url":"https://api.github.com/users/shawon-sharma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shawon-sharma/subscriptions","organizations_url":"https://api.github.com/users/shawon-sharma/orgs","repos_url":"https://api.github.com/users/shawon-sharma/repos","events_url":"https://api.github.com/users/shawon-sharma/events{/privacy}","received_events_url":"https://api.github.com/users/shawon-sharma/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shawon-sharma/fels_99","description":"Framgia E-Learning system (training)","fork":true,"url":"https://api.github.com/repos/shawon-sharma/fels_99","forks_url":"https://api.github.com/repos/shawon-sharma/fels_99/forks","keys_url":"https://api.github.com/repos/shawon-sharma/fels_99/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shawon-sharma/fels_99/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shawon-sharma/fels_99/teams","hooks_url":"https://api.github.com/repos/shawon-sharma/fels_99/hooks","issue_events_url":"https://api.github.com/repos/shawon-sharma/fels_99/issues/events{/number}","events_url":"https://api.github.com/repos/shawon-sharma/fels_99/events","assignees_url":"https://api.github.com/repos/shawon-sharma/fels_99/assignees{/user}","branches_url":"https://api.github.com/repos/shawon-sharma/fels_99/branches{/branch}","tags_url":"https://api.github.com/repos/shawon-sharma/fels_99/tags","blobs_url":"https://api.github.com/repos/shawon-sharma/fels_99/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shawon-sharma/fels_99/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shawon-sharma/fels_99/git/refs{/sha}","trees_url":"https://api.github.com/repos/shawon-sharma/fels_99/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shawon-sharma/fels_99/statuses/{sha}","languages_url":"https://api.github.com/repos/shawon-sharma/fels_99/languages","stargazers_url":"https://api.github.com/repos/shawon-sharma/fels_99/stargazers","contributors_url":"https://api.github.com/repos/shawon-sharma/fels_99/contributors","subscribers_url":"https://api.github.com/repos/shawon-sharma/fels_99/subscribers","subscription_url":"https://api.github.com/repos/shawon-sharma/fels_99/subscription","commits_url":"https://api.github.com/repos/shawon-sharma/fels_99/commits{/sha}","git_commits_url":"https://api.github.com/repos/shawon-sharma/fels_99/git/commits{/sha}","comments_url":"https://api.github.com/repos/shawon-sharma/fels_99/comments{/number}","issue_comment_url":"https://api.github.com/repos/shawon-sharma/fels_99/issues/comments{/number}","contents_url":"https://api.github.com/repos/shawon-sharma/fels_99/contents/{+path}","compare_url":"https://api.github.com/repos/shawon-sharma/fels_99/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shawon-sharma/fels_99/merges","archive_url":"https://api.github.com/repos/shawon-sharma/fels_99/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shawon-sharma/fels_99/downloads","issues_url":"https://api.github.com/repos/shawon-sharma/fels_99/issues{/number}","pulls_url":"https://api.github.com/repos/shawon-sharma/fels_99/pulls{/number}","milestones_url":"https://api.github.com/repos/shawon-sharma/fels_99/milestones{/number}","notifications_url":"https://api.github.com/repos/shawon-sharma/fels_99/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shawon-sharma/fels_99/labels{/name}","releases_url":"https://api.github.com/repos/shawon-sharma/fels_99/releases{/id}","created_at":"2015-12-08T08:03:55Z","updated_at":"2015-12-08T07:43:10Z","pushed_at":"2015-12-28T06:35:47Z","git_url":"git://github.com/shawon-sharma/fels_99.git","ssh_url":"git@github.com:shawon-sharma/fels_99.git","clone_url":"https://github.com/shawon-sharma/fels_99.git","svn_url":"https://github.com/shawon-sharma/fels_99","homepage":null,"size":573,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"framgia:develop","ref":"develop","sha":"1fafe8261b9b1c88e16e1f0b989d43337c465c81","user":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"repo":{"id":47606714,"name":"fels_99","full_name":"framgia/fels_99","owner":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/framgia/fels_99","description":"Framgia E-Learning system (training)","fork":false,"url":"https://api.github.com/repos/framgia/fels_99","forks_url":"https://api.github.com/repos/framgia/fels_99/forks","keys_url":"https://api.github.com/repos/framgia/fels_99/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/fels_99/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/fels_99/teams","hooks_url":"https://api.github.com/repos/framgia/fels_99/hooks","issue_events_url":"https://api.github.com/repos/framgia/fels_99/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/fels_99/events","assignees_url":"https://api.github.com/repos/framgia/fels_99/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/fels_99/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/fels_99/tags","blobs_url":"https://api.github.com/repos/framgia/fels_99/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/fels_99/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/fels_99/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/fels_99/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/fels_99/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/fels_99/languages","stargazers_url":"https://api.github.com/repos/framgia/fels_99/stargazers","contributors_url":"https://api.github.com/repos/framgia/fels_99/contributors","subscribers_url":"https://api.github.com/repos/framgia/fels_99/subscribers","subscription_url":"https://api.github.com/repos/framgia/fels_99/subscription","commits_url":"https://api.github.com/repos/framgia/fels_99/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/fels_99/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/fels_99/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/fels_99/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/fels_99/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/fels_99/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/fels_99/merges","archive_url":"https://api.github.com/repos/framgia/fels_99/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/fels_99/downloads","issues_url":"https://api.github.com/repos/framgia/fels_99/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/fels_99/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/fels_99/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/fels_99/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/fels_99/labels{/name}","releases_url":"https://api.github.com/repos/framgia/fels_99/releases{/id}","created_at":"2015-12-08T07:43:10Z","updated_at":"2015-12-08T07:43:10Z","pushed_at":"2015-12-28T06:35:47Z","git_url":"git://github.com/framgia/fels_99.git","ssh_url":"git@github.com:framgia/fels_99.git","clone_url":"https://github.com/framgia/fels_99.git","svn_url":"https://github.com/framgia/fels_99","homepage":null,"size":583,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":1,"forks":4,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_99/pulls/21"},"html":{"href":"https://github.com/framgia/fels_99/pull/21"},"issue":{"href":"https://api.github.com/repos/framgia/fels_99/issues/21"},"comments":{"href":"https://api.github.com/repos/framgia/fels_99/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/fels_99/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/fels_99/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/fels_99/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/fels_99/statuses/528c42b3dbaa249e47363f08a139ea9de8499e70"}}}}