{"action":"created","comment":{"url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/pulls/comments/105475573","pull_request_review_id":26362508,"id":105475573,"diff_hunk":"@@ -1,107 +1,144 @@\n import { Injectable, Inject } from '@angular/core';\n import { Headers, Http } from '@angular/http';\n+import { Observable } from 'rxjs';\n \n import 'rxjs/add/operator/toPromise';\n import 'rxjs/add/operator/catch';\n+import { cloneDeep } from 'lodash';\n \n import { Broadcaster } from '../shared/broadcaster.service';\n import { AuthenticationService } from '../auth/authentication.service';\n import { Logger } from '../shared/logger.service';\n import { AUTH_API_URL } from '../shared/auth-api';\n import { User } from './user';\n-import { Observable } from 'rxjs';\n \n /**\n  *  Provides user and user list methods to retrieve current or user list details\n  *\n  *  The UserService should be injected at the root of the application to ensure it is a singleton\n  *  getUser and getAllUsers return observables that can be subscribed to for information\n  */\n-\n @Injectable()\n export class UserService {\n \n-  userData: User = {} as User;\n-  allUserData: User[] = [];\n+  /**\n+   * @deprecated since v0.4.4. Use {@link #loggedInUser} instead.\n+   */\n+  private userData: User = {} as User;\n+\n+  /**\n+   * @deprecated since v0.4.4. No replacement method is provided.\n+   */\n+  private allUserData: User[] = [];\n \n-  private headers = new Headers({'Content-Type': 'application/json'});\n+  private headers = new Headers({ 'Content-Type': 'application/json' });\n   private userUrl: string;  // URL to web api\n   private usersUrl: string;  // URL to web api\n \n-\n   constructor(private http: Http,\n-              private logger: Logger,\n-              private auth: AuthenticationService,\n-              private broadcaster: Broadcaster,\n-              @Inject(AUTH_API_URL) apiUrl: string\n+    private logger: Logger,","path":"src/app/user/user.service.ts","position":49,"original_position":49,"commit_id":"f27dd4312a804e1d77e8ce7586295dc7fea1b5bb","original_commit_id":"f27dd4312a804e1d77e8ce7586295dc7fea1b5bb","user":{"login":"joshuawilson","id":1184371,"avatar_url":"https://avatars1.githubusercontent.com/u/1184371?v=3","gravatar_id":"","url":"https://api.github.com/users/joshuawilson","html_url":"https://github.com/joshuawilson","followers_url":"https://api.github.com/users/joshuawilson/followers","following_url":"https://api.github.com/users/joshuawilson/following{/other_user}","gists_url":"https://api.github.com/users/joshuawilson/gists{/gist_id}","starred_url":"https://api.github.com/users/joshuawilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshuawilson/subscriptions","organizations_url":"https://api.github.com/users/joshuawilson/orgs","repos_url":"https://api.github.com/users/joshuawilson/repos","events_url":"https://api.github.com/users/joshuawilson/events{/privacy}","received_events_url":"https://api.github.com/users/joshuawilson/received_events","type":"User","site_admin":false},"body":"if you are going to move things over, you should take the one above it too ;)","created_at":"2017-03-10T19:51:46Z","updated_at":"2017-03-10T19:51:46Z","html_url":"https://github.com/fabric8-ui/ngx-login-client/pull/15#discussion_r105475573","pull_request_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/pulls/15","_links":{"self":{"href":"https://api.github.com/repos/fabric8-ui/ngx-login-client/pulls/comments/105475573"},"html":{"href":"https://github.com/fabric8-ui/ngx-login-client/pull/15#discussion_r105475573"},"pull_request":{"href":"https://api.github.com/repos/fabric8-ui/ngx-login-client/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/pulls/15","id":110196445,"html_url":"https://github.com/fabric8-ui/ngx-login-client/pull/15","diff_url":"https://github.com/fabric8-ui/ngx-login-client/pull/15.diff","patch_url":"https://github.com/fabric8-ui/ngx-login-client/pull/15.patch","issue_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/issues/15","number":15,"state":"open","locked":false,"title":"fix(users): deprecate all existing API, use rxjs","user":{"login":"pmuir","id":157761,"avatar_url":"https://avatars3.githubusercontent.com/u/157761?v=3","gravatar_id":"","url":"https://api.github.com/users/pmuir","html_url":"https://github.com/pmuir","followers_url":"https://api.github.com/users/pmuir/followers","following_url":"https://api.github.com/users/pmuir/following{/other_user}","gists_url":"https://api.github.com/users/pmuir/gists{/gist_id}","starred_url":"https://api.github.com/users/pmuir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmuir/subscriptions","organizations_url":"https://api.github.com/users/pmuir/orgs","repos_url":"https://api.github.com/users/pmuir/repos","events_url":"https://api.github.com/users/pmuir/events{/privacy}","received_events_url":"https://api.github.com/users/pmuir/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-03-10T19:46:15Z","updated_at":"2017-03-10T19:51:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c648e190a80c02e8faaeb59901818941daf0b87a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/pulls/15/commits","review_comments_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/pulls/15/comments","review_comment_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/issues/15/comments","statuses_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/statuses/f27dd4312a804e1d77e8ce7586295dc7fea1b5bb","head":{"label":"pmuir:rxjs-upgrade","ref":"rxjs-upgrade","sha":"f27dd4312a804e1d77e8ce7586295dc7fea1b5bb","user":{"login":"pmuir","id":157761,"avatar_url":"https://avatars3.githubusercontent.com/u/157761?v=3","gravatar_id":"","url":"https://api.github.com/users/pmuir","html_url":"https://github.com/pmuir","followers_url":"https://api.github.com/users/pmuir/followers","following_url":"https://api.github.com/users/pmuir/following{/other_user}","gists_url":"https://api.github.com/users/pmuir/gists{/gist_id}","starred_url":"https://api.github.com/users/pmuir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmuir/subscriptions","organizations_url":"https://api.github.com/users/pmuir/orgs","repos_url":"https://api.github.com/users/pmuir/repos","events_url":"https://api.github.com/users/pmuir/events{/privacy}","received_events_url":"https://api.github.com/users/pmuir/received_events","type":"User","site_admin":false},"repo":{"id":82277286,"name":"ngx-login-client","full_name":"pmuir/ngx-login-client","owner":{"login":"pmuir","id":157761,"avatar_url":"https://avatars3.githubusercontent.com/u/157761?v=3","gravatar_id":"","url":"https://api.github.com/users/pmuir","html_url":"https://github.com/pmuir","followers_url":"https://api.github.com/users/pmuir/followers","following_url":"https://api.github.com/users/pmuir/following{/other_user}","gists_url":"https://api.github.com/users/pmuir/gists{/gist_id}","starred_url":"https://api.github.com/users/pmuir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmuir/subscriptions","organizations_url":"https://api.github.com/users/pmuir/orgs","repos_url":"https://api.github.com/users/pmuir/repos","events_url":"https://api.github.com/users/pmuir/events{/privacy}","received_events_url":"https://api.github.com/users/pmuir/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pmuir/ngx-login-client","description":"Auth and User services for Angular v2 and up","fork":true,"url":"https://api.github.com/repos/pmuir/ngx-login-client","forks_url":"https://api.github.com/repos/pmuir/ngx-login-client/forks","keys_url":"https://api.github.com/repos/pmuir/ngx-login-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pmuir/ngx-login-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pmuir/ngx-login-client/teams","hooks_url":"https://api.github.com/repos/pmuir/ngx-login-client/hooks","issue_events_url":"https://api.github.com/repos/pmuir/ngx-login-client/issues/events{/number}","events_url":"https://api.github.com/repos/pmuir/ngx-login-client/events","assignees_url":"https://api.github.com/repos/pmuir/ngx-login-client/assignees{/user}","branches_url":"https://api.github.com/repos/pmuir/ngx-login-client/branches{/branch}","tags_url":"https://api.github.com/repos/pmuir/ngx-login-client/tags","blobs_url":"https://api.github.com/repos/pmuir/ngx-login-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pmuir/ngx-login-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pmuir/ngx-login-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/pmuir/ngx-login-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pmuir/ngx-login-client/statuses/{sha}","languages_url":"https://api.github.com/repos/pmuir/ngx-login-client/languages","stargazers_url":"https://api.github.com/repos/pmuir/ngx-login-client/stargazers","contributors_url":"https://api.github.com/repos/pmuir/ngx-login-client/contributors","subscribers_url":"https://api.github.com/repos/pmuir/ngx-login-client/subscribers","subscription_url":"https://api.github.com/repos/pmuir/ngx-login-client/subscription","commits_url":"https://api.github.com/repos/pmuir/ngx-login-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/pmuir/ngx-login-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/pmuir/ngx-login-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/pmuir/ngx-login-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/pmuir/ngx-login-client/contents/{+path}","compare_url":"https://api.github.com/repos/pmuir/ngx-login-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pmuir/ngx-login-client/merges","archive_url":"https://api.github.com/repos/pmuir/ngx-login-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pmuir/ngx-login-client/downloads","issues_url":"https://api.github.com/repos/pmuir/ngx-login-client/issues{/number}","pulls_url":"https://api.github.com/repos/pmuir/ngx-login-client/pulls{/number}","milestones_url":"https://api.github.com/repos/pmuir/ngx-login-client/milestones{/number}","notifications_url":"https://api.github.com/repos/pmuir/ngx-login-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pmuir/ngx-login-client/labels{/name}","releases_url":"https://api.github.com/repos/pmuir/ngx-login-client/releases{/id}","deployments_url":"https://api.github.com/repos/pmuir/ngx-login-client/deployments","created_at":"2017-02-17T08:55:02Z","updated_at":"2017-02-17T08:55:04Z","pushed_at":"2017-03-10T19:46:03Z","git_url":"git://github.com/pmuir/ngx-login-client.git","ssh_url":"git@github.com:pmuir/ngx-login-client.git","clone_url":"https://github.com/pmuir/ngx-login-client.git","svn_url":"https://github.com/pmuir/ngx-login-client","homepage":null,"size":2130,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"fabric8-ui:master","ref":"master","sha":"10a62e6226730135a383cb495c96fa4ca02003b4","user":{"login":"fabric8-ui","id":25244298,"avatar_url":"https://avatars1.githubusercontent.com/u/25244298?v=3","gravatar_id":"","url":"https://api.github.com/users/fabric8-ui","html_url":"https://github.com/fabric8-ui","followers_url":"https://api.github.com/users/fabric8-ui/followers","following_url":"https://api.github.com/users/fabric8-ui/following{/other_user}","gists_url":"https://api.github.com/users/fabric8-ui/gists{/gist_id}","starred_url":"https://api.github.com/users/fabric8-ui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabric8-ui/subscriptions","organizations_url":"https://api.github.com/users/fabric8-ui/orgs","repos_url":"https://api.github.com/users/fabric8-ui/repos","events_url":"https://api.github.com/users/fabric8-ui/events{/privacy}","received_events_url":"https://api.github.com/users/fabric8-ui/received_events","type":"Organization","site_admin":false},"repo":{"id":78260746,"name":"ngx-login-client","full_name":"fabric8-ui/ngx-login-client","owner":{"login":"fabric8-ui","id":25244298,"avatar_url":"https://avatars1.githubusercontent.com/u/25244298?v=3","gravatar_id":"","url":"https://api.github.com/users/fabric8-ui","html_url":"https://github.com/fabric8-ui","followers_url":"https://api.github.com/users/fabric8-ui/followers","following_url":"https://api.github.com/users/fabric8-ui/following{/other_user}","gists_url":"https://api.github.com/users/fabric8-ui/gists{/gist_id}","starred_url":"https://api.github.com/users/fabric8-ui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabric8-ui/subscriptions","organizations_url":"https://api.github.com/users/fabric8-ui/orgs","repos_url":"https://api.github.com/users/fabric8-ui/repos","events_url":"https://api.github.com/users/fabric8-ui/events{/privacy}","received_events_url":"https://api.github.com/users/fabric8-ui/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fabric8-ui/ngx-login-client","description":"Auth and User services for Angular v2 and up","fork":false,"url":"https://api.github.com/repos/fabric8-ui/ngx-login-client","forks_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/forks","keys_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/teams","hooks_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/hooks","issue_events_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/issues/events{/number}","events_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/events","assignees_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/assignees{/user}","branches_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/branches{/branch}","tags_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/tags","blobs_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/statuses/{sha}","languages_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/languages","stargazers_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/stargazers","contributors_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/contributors","subscribers_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/subscribers","subscription_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/subscription","commits_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/contents/{+path}","compare_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/merges","archive_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/downloads","issues_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/issues{/number}","pulls_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/pulls{/number}","milestones_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/milestones{/number}","notifications_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/labels{/name}","releases_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/releases{/id}","deployments_url":"https://api.github.com/repos/fabric8-ui/ngx-login-client/deployments","created_at":"2017-01-07T05:33:01Z","updated_at":"2017-03-06T21:22:54Z","pushed_at":"2017-03-10T19:46:16Z","git_url":"git://github.com/fabric8-ui/ngx-login-client.git","ssh_url":"git@github.com:fabric8-ui/ngx-login-client.git","clone_url":"https://github.com/fabric8-ui/ngx-login-client.git","svn_url":"https://github.com/fabric8-ui/ngx-login-client","homepage":null,"size":2095,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":2,"forks":6,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fabric8-ui/ngx-login-client/pulls/15"},"html":{"href":"https://github.com/fabric8-ui/ngx-login-client/pull/15"},"issue":{"href":"https://api.github.com/repos/fabric8-ui/ngx-login-client/issues/15"},"comments":{"href":"https://api.github.com/repos/fabric8-ui/ngx-login-client/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/fabric8-ui/ngx-login-client/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/fabric8-ui/ngx-login-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fabric8-ui/ngx-login-client/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/fabric8-ui/ngx-login-client/statuses/f27dd4312a804e1d77e8ce7586295dc7fea1b5bb"}}}}
{"actor":{"display_login":"joshuawilson"}}