{"action":"created","comment":{"url":"https://api.github.com/repos/itsyouonline/identityserver/pulls/comments/52594930","id":52594930,"diff_hunk":"@@ -0,0 +1,164 @@\n+package api\n+\n+import (\n+\t\"encoding/json\"\n+\t\"io\"\n+\t\"io/ioutil\"\n+\t\"net/http\"\n+\n+\tlog \"github.com/Sirupsen/logrus\"\n+\t\"github.com/gorilla/mux\"\n+\n+\tuserModel \"github.com/itsyouonline/identityserver/apps/user/models\"\n+\tresource \"github.com/itsyouonline/identityserver/http\"\n+)\n+\n+type UserDetails struct {\n+\tuserModel.User\n+\tUri          string `json:\"uri\"`\n+\tCompaniesUri string `json:\"companiesUri\"`\n+}\n+\n+type UserListResponse struct {\n+\tCount       int         `json:\"count\"`\n+\tObjects     UserObjects `json:\"objects\"`\n+\tNextUri     string      `json:\"nextUri\"`\n+\tPreviousUri string      `json:\"previousUri\"`\n+\tOffset      int         `json:\"offset\"`\n+\tLimit       int         `json:\"limit\"`\n+}\n+\n+type UserObjects []*UserDetails\n+\n+type UserResource struct {\n+\tresource.Resource\n+}\n+\n+func NewUserResource() *UserResource {\n+\tu := &UserResource{}\n+\tu.ResourceHandler = u\n+\n+\treturn u\n+}\n+\n+func (u *UserResource) GetRoutes() resource.ResourceRoutes {\n+\troutes := resource.ResourceRoutes{\n+\t\tresource.ResourceRoute{\n+\t\t\tName: \"UserList\",\n+\t\t\tMethods: resource.RouteMethods{\n+\t\t\t\tresource.GET,\n+\t\t\t\tresource.POST,\n+\t\t\t},\n+\t\t\tPath:        \"/users/\",\n+\t\t\tHandlerFunc: u.DispatchList,\n+\t\t},\n+\t\tresource.ResourceRoute{\n+\t\t\tName: \"UserDetail\",\n+\t\t\tMethods: resource.RouteMethods{\n+\t\t\t\tresource.GET,\n+\t\t\t},\n+\t\t\tPath:        \"/users/{id}/\",\n+\t\t\tHandlerFunc: u.DispatchDetail,\n+\t\t},\n+\t}\n+\n+\treturn routes\n+}\n+\n+func (u *UserResource) GetList(w http.ResponseWriter, r *http.Request) {","path":"apps/user/api/users.go","position":68,"original_position":68,"commit_id":"b00c78d20a3e4d8bde1fcc73e3389b383a2c5c5c","original_commit_id":"b00c78d20a3e4d8bde1fcc73e3389b383a2c5c5c","user":{"login":"robvanmieghem","id":3511318,"avatar_url":"https://avatars.githubusercontent.com/u/3511318?v=3","gravatar_id":"","url":"https://api.github.com/users/robvanmieghem","html_url":"https://github.com/robvanmieghem","followers_url":"https://api.github.com/users/robvanmieghem/followers","following_url":"https://api.github.com/users/robvanmieghem/following{/other_user}","gists_url":"https://api.github.com/users/robvanmieghem/gists{/gist_id}","starred_url":"https://api.github.com/users/robvanmieghem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robvanmieghem/subscriptions","organizations_url":"https://api.github.com/users/robvanmieghem/orgs","repos_url":"https://api.github.com/users/robvanmieghem/repos","events_url":"https://api.github.com/users/robvanmieghem/events{/privacy}","received_events_url":"https://api.github.com/users/robvanmieghem/received_events","type":"User","site_admin":false},"body":"There is not user listing in the identityserver","created_at":"2016-02-11T12:30:34Z","updated_at":"2016-02-11T12:30:34Z","html_url":"https://github.com/itsyouonline/identityserver/pull/1#discussion_r52594930","pull_request_url":"https://api.github.com/repos/itsyouonline/identityserver/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/itsyouonline/identityserver/pulls/comments/52594930"},"html":{"href":"https://github.com/itsyouonline/identityserver/pull/1#discussion_r52594930"},"pull_request":{"href":"https://api.github.com/repos/itsyouonline/identityserver/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/itsyouonline/identityserver/pulls/1","id":58884345,"html_url":"https://github.com/itsyouonline/identityserver/pull/1","diff_url":"https://github.com/itsyouonline/identityserver/pull/1.diff","patch_url":"https://github.com/itsyouonline/identityserver/pull/1.patch","issue_url":"https://api.github.com/repos/itsyouonline/identityserver/issues/1","number":1,"state":"open","locked":false,"title":"User API implementation","user":{"login":"mohabusama","id":488406,"avatar_url":"https://avatars.githubusercontent.com/u/488406?v=3","gravatar_id":"","url":"https://api.github.com/users/mohabusama","html_url":"https://github.com/mohabusama","followers_url":"https://api.github.com/users/mohabusama/followers","following_url":"https://api.github.com/users/mohabusama/following{/other_user}","gists_url":"https://api.github.com/users/mohabusama/gists{/gist_id}","starred_url":"https://api.github.com/users/mohabusama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mohabusama/subscriptions","organizations_url":"https://api.github.com/users/mohabusama/orgs","repos_url":"https://api.github.com/users/mohabusama/repos","events_url":"https://api.github.com/users/mohabusama/events{/privacy}","received_events_url":"https://api.github.com/users/mohabusama/received_events","type":"User","site_admin":false},"body":"+ Structure\r\n+ Resources, DB & routing abstraction implementation\r\n+ User model & API","created_at":"2016-02-10T12:33:21Z","updated_at":"2016-02-11T12:30:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ef82319695fb1eccdd28e0381f67bdaa822c5110","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/itsyouonline/identityserver/pulls/1/commits","review_comments_url":"https://api.github.com/repos/itsyouonline/identityserver/pulls/1/comments","review_comment_url":"https://api.github.com/repos/itsyouonline/identityserver/pulls/comments{/number}","comments_url":"https://api.github.com/repos/itsyouonline/identityserver/issues/1/comments","statuses_url":"https://api.github.com/repos/itsyouonline/identityserver/statuses/b00c78d20a3e4d8bde1fcc73e3389b383a2c5c5c","head":{"label":"mohabusama:master","ref":"master","sha":"b00c78d20a3e4d8bde1fcc73e3389b383a2c5c5c","user":{"login":"mohabusama","id":488406,"avatar_url":"https://avatars.githubusercontent.com/u/488406?v=3","gravatar_id":"","url":"https://api.github.com/users/mohabusama","html_url":"https://github.com/mohabusama","followers_url":"https://api.github.com/users/mohabusama/followers","following_url":"https://api.github.com/users/mohabusama/following{/other_user}","gists_url":"https://api.github.com/users/mohabusama/gists{/gist_id}","starred_url":"https://api.github.com/users/mohabusama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mohabusama/subscriptions","organizations_url":"https://api.github.com/users/mohabusama/orgs","repos_url":"https://api.github.com/users/mohabusama/repos","events_url":"https://api.github.com/users/mohabusama/events{/privacy}","received_events_url":"https://api.github.com/users/mohabusama/received_events","type":"User","site_admin":false},"repo":{"id":51076052,"name":"identityserver","full_name":"mohabusama/identityserver","owner":{"login":"mohabusama","id":488406,"avatar_url":"https://avatars.githubusercontent.com/u/488406?v=3","gravatar_id":"","url":"https://api.github.com/users/mohabusama","html_url":"https://github.com/mohabusama","followers_url":"https://api.github.com/users/mohabusama/followers","following_url":"https://api.github.com/users/mohabusama/following{/other_user}","gists_url":"https://api.github.com/users/mohabusama/gists{/gist_id}","starred_url":"https://api.github.com/users/mohabusama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mohabusama/subscriptions","organizations_url":"https://api.github.com/users/mohabusama/orgs","repos_url":"https://api.github.com/users/mohabusama/repos","events_url":"https://api.github.com/users/mohabusama/events{/privacy}","received_events_url":"https://api.github.com/users/mohabusama/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mohabusama/identityserver","description":"","fork":true,"url":"https://api.github.com/repos/mohabusama/identityserver","forks_url":"https://api.github.com/repos/mohabusama/identityserver/forks","keys_url":"https://api.github.com/repos/mohabusama/identityserver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mohabusama/identityserver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mohabusama/identityserver/teams","hooks_url":"https://api.github.com/repos/mohabusama/identityserver/hooks","issue_events_url":"https://api.github.com/repos/mohabusama/identityserver/issues/events{/number}","events_url":"https://api.github.com/repos/mohabusama/identityserver/events","assignees_url":"https://api.github.com/repos/mohabusama/identityserver/assignees{/user}","branches_url":"https://api.github.com/repos/mohabusama/identityserver/branches{/branch}","tags_url":"https://api.github.com/repos/mohabusama/identityserver/tags","blobs_url":"https://api.github.com/repos/mohabusama/identityserver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mohabusama/identityserver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mohabusama/identityserver/git/refs{/sha}","trees_url":"https://api.github.com/repos/mohabusama/identityserver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mohabusama/identityserver/statuses/{sha}","languages_url":"https://api.github.com/repos/mohabusama/identityserver/languages","stargazers_url":"https://api.github.com/repos/mohabusama/identityserver/stargazers","contributors_url":"https://api.github.com/repos/mohabusama/identityserver/contributors","subscribers_url":"https://api.github.com/repos/mohabusama/identityserver/subscribers","subscription_url":"https://api.github.com/repos/mohabusama/identityserver/subscription","commits_url":"https://api.github.com/repos/mohabusama/identityserver/commits{/sha}","git_commits_url":"https://api.github.com/repos/mohabusama/identityserver/git/commits{/sha}","comments_url":"https://api.github.com/repos/mohabusama/identityserver/comments{/number}","issue_comment_url":"https://api.github.com/repos/mohabusama/identityserver/issues/comments{/number}","contents_url":"https://api.github.com/repos/mohabusama/identityserver/contents/{+path}","compare_url":"https://api.github.com/repos/mohabusama/identityserver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mohabusama/identityserver/merges","archive_url":"https://api.github.com/repos/mohabusama/identityserver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mohabusama/identityserver/downloads","issues_url":"https://api.github.com/repos/mohabusama/identityserver/issues{/number}","pulls_url":"https://api.github.com/repos/mohabusama/identityserver/pulls{/number}","milestones_url":"https://api.github.com/repos/mohabusama/identityserver/milestones{/number}","notifications_url":"https://api.github.com/repos/mohabusama/identityserver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mohabusama/identityserver/labels{/name}","releases_url":"https://api.github.com/repos/mohabusama/identityserver/releases{/id}","deployments_url":"https://api.github.com/repos/mohabusama/identityserver/deployments","created_at":"2016-02-04T12:59:26Z","updated_at":"2016-02-07T11:32:19Z","pushed_at":"2016-02-10T14:29:12Z","git_url":"git://github.com/mohabusama/identityserver.git","ssh_url":"git@github.com:mohabusama/identityserver.git","clone_url":"https://github.com/mohabusama/identityserver.git","svn_url":"https://github.com/mohabusama/identityserver","homepage":null,"size":26,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"itsyouonline:master","ref":"master","sha":"f3e29073450f1b55f994c57e38bb49416ced1edb","user":{"login":"itsyouonline","id":16935446,"avatar_url":"https://avatars.githubusercontent.com/u/16935446?v=3","gravatar_id":"","url":"https://api.github.com/users/itsyouonline","html_url":"https://github.com/itsyouonline","followers_url":"https://api.github.com/users/itsyouonline/followers","following_url":"https://api.github.com/users/itsyouonline/following{/other_user}","gists_url":"https://api.github.com/users/itsyouonline/gists{/gist_id}","starred_url":"https://api.github.com/users/itsyouonline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itsyouonline/subscriptions","organizations_url":"https://api.github.com/users/itsyouonline/orgs","repos_url":"https://api.github.com/users/itsyouonline/repos","events_url":"https://api.github.com/users/itsyouonline/events{/privacy}","received_events_url":"https://api.github.com/users/itsyouonline/received_events","type":"Organization","site_admin":false},"repo":{"id":50837261,"name":"identityserver","full_name":"itsyouonline/identityserver","owner":{"login":"itsyouonline","id":16935446,"avatar_url":"https://avatars.githubusercontent.com/u/16935446?v=3","gravatar_id":"","url":"https://api.github.com/users/itsyouonline","html_url":"https://github.com/itsyouonline","followers_url":"https://api.github.com/users/itsyouonline/followers","following_url":"https://api.github.com/users/itsyouonline/following{/other_user}","gists_url":"https://api.github.com/users/itsyouonline/gists{/gist_id}","starred_url":"https://api.github.com/users/itsyouonline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itsyouonline/subscriptions","organizations_url":"https://api.github.com/users/itsyouonline/orgs","repos_url":"https://api.github.com/users/itsyouonline/repos","events_url":"https://api.github.com/users/itsyouonline/events{/privacy}","received_events_url":"https://api.github.com/users/itsyouonline/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/itsyouonline/identityserver","description":"","fork":false,"url":"https://api.github.com/repos/itsyouonline/identityserver","forks_url":"https://api.github.com/repos/itsyouonline/identityserver/forks","keys_url":"https://api.github.com/repos/itsyouonline/identityserver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/itsyouonline/identityserver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/itsyouonline/identityserver/teams","hooks_url":"https://api.github.com/repos/itsyouonline/identityserver/hooks","issue_events_url":"https://api.github.com/repos/itsyouonline/identityserver/issues/events{/number}","events_url":"https://api.github.com/repos/itsyouonline/identityserver/events","assignees_url":"https://api.github.com/repos/itsyouonline/identityserver/assignees{/user}","branches_url":"https://api.github.com/repos/itsyouonline/identityserver/branches{/branch}","tags_url":"https://api.github.com/repos/itsyouonline/identityserver/tags","blobs_url":"https://api.github.com/repos/itsyouonline/identityserver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/itsyouonline/identityserver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/itsyouonline/identityserver/git/refs{/sha}","trees_url":"https://api.github.com/repos/itsyouonline/identityserver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/itsyouonline/identityserver/statuses/{sha}","languages_url":"https://api.github.com/repos/itsyouonline/identityserver/languages","stargazers_url":"https://api.github.com/repos/itsyouonline/identityserver/stargazers","contributors_url":"https://api.github.com/repos/itsyouonline/identityserver/contributors","subscribers_url":"https://api.github.com/repos/itsyouonline/identityserver/subscribers","subscription_url":"https://api.github.com/repos/itsyouonline/identityserver/subscription","commits_url":"https://api.github.com/repos/itsyouonline/identityserver/commits{/sha}","git_commits_url":"https://api.github.com/repos/itsyouonline/identityserver/git/commits{/sha}","comments_url":"https://api.github.com/repos/itsyouonline/identityserver/comments{/number}","issue_comment_url":"https://api.github.com/repos/itsyouonline/identityserver/issues/comments{/number}","contents_url":"https://api.github.com/repos/itsyouonline/identityserver/contents/{+path}","compare_url":"https://api.github.com/repos/itsyouonline/identityserver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/itsyouonline/identityserver/merges","archive_url":"https://api.github.com/repos/itsyouonline/identityserver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/itsyouonline/identityserver/downloads","issues_url":"https://api.github.com/repos/itsyouonline/identityserver/issues{/number}","pulls_url":"https://api.github.com/repos/itsyouonline/identityserver/pulls{/number}","milestones_url":"https://api.github.com/repos/itsyouonline/identityserver/milestones{/number}","notifications_url":"https://api.github.com/repos/itsyouonline/identityserver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/itsyouonline/identityserver/labels{/name}","releases_url":"https://api.github.com/repos/itsyouonline/identityserver/releases{/id}","deployments_url":"https://api.github.com/repos/itsyouonline/identityserver/deployments","created_at":"2016-02-01T12:15:04Z","updated_at":"2016-02-09T09:20:53Z","pushed_at":"2016-02-10T14:29:13Z","git_url":"git://github.com/itsyouonline/identityserver.git","ssh_url":"git@github.com:itsyouonline/identityserver.git","clone_url":"https://github.com/itsyouonline/identityserver.git","svn_url":"https://github.com/itsyouonline/identityserver","homepage":null,"size":18,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/itsyouonline/identityserver/pulls/1"},"html":{"href":"https://github.com/itsyouonline/identityserver/pull/1"},"issue":{"href":"https://api.github.com/repos/itsyouonline/identityserver/issues/1"},"comments":{"href":"https://api.github.com/repos/itsyouonline/identityserver/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/itsyouonline/identityserver/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/itsyouonline/identityserver/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/itsyouonline/identityserver/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/itsyouonline/identityserver/statuses/b00c78d20a3e4d8bde1fcc73e3389b383a2c5c5c"}}}}