{"action":"created","comment":{"url":"https://api.github.com/repos/codeBelt/angular-routing/pulls/comments/154208585","pull_request_review_id":80338376,"id":154208585,"diff_hunk":"@@ -0,0 +1,53 @@\n+import {Actions, Effect} from '@ngrx/effects';\n+import {HttpClient, HttpErrorResponse, HttpResponse} from '@angular/common/http';\n+import {Injectable} from '@angular/core';\n+import {Observable} from 'rxjs/Observable';\n+import {UserAction} from './user.action';\n+import 'rxjs/add/operator/map';\n+import 'rxjs/add/operator/mergeMap';\n+import 'rxjs/add/operator/catch';\n+import {of} from 'rxjs/observable/of';\n+import {IAction} from '../i-action';\n+import {IUser} from './models/i-user';\n+import {IUserResponse} from './models/i-user-response';\n+\n+@Injectable()\n+export class UserEffects {\n+\n+    @Effect()\n+    public fetchUser(): Observable<IAction<IUser>> {\n+        const url: string = 'https://randomuser.me/api/?inc=picture,name,email,phone,id,dob';\n+\n+        return this\n+            .actions$\n+            .ofType(UserAction.LOAD_USER)\n+            .mergeMap((action: IAction<void>) => {\n+                return this.http\n+                    .get(url, {observe: 'response'})\n+                    .map((response: HttpResponse<IUserResponse>): IAction<IUser> => {\n+                        return {\n+                            type: UserAction.LOAD_USER_SUCCESS,\n+                            payload: response.body.results[0],\n+                        };\n+                    })\n+                    .catch((errorResponse: HttpErrorResponse) => {\n+                        const failAction: IAction<any> = {\n+                            type: UserAction.LOAD_USER_FAIL,\n+                            payload: errorResponse,\n+                            error: true,\n+                            meta: url,\n+                        };\n+\n+                        return of(failAction);\n+                    });\n+            });\n+    }\n+\n+    constructor(\n+        private http: HttpClient,","path":"src/app/stores/user/user.effect.ts","position":47,"original_position":47,"commit_id":"16ac6dc56bac1afd6955b21ffeded8a840b88865","original_commit_id":"0accb653a8cd1617bd9bfc13fe0dd8922578230c","user":{"login":"ccheney","id":302437,"avatar_url":"https://avatars0.githubusercontent.com/u/302437?v=4","gravatar_id":"","url":"https://api.github.com/users/ccheney","html_url":"https://github.com/ccheney","followers_url":"https://api.github.com/users/ccheney/followers","following_url":"https://api.github.com/users/ccheney/following{/other_user}","gists_url":"https://api.github.com/users/ccheney/gists{/gist_id}","starred_url":"https://api.github.com/users/ccheney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ccheney/subscriptions","organizations_url":"https://api.github.com/users/ccheney/orgs","repos_url":"https://api.github.com/users/ccheney/repos","events_url":"https://api.github.com/users/ccheney/events{/privacy}","received_events_url":"https://api.github.com/users/ccheney/received_events","type":"User","site_admin":false},"body":"use `_` for private members","created_at":"2017-11-30T21:36:56Z","updated_at":"2017-11-30T21:37:34Z","html_url":"https://github.com/codeBelt/angular-routing/pull/1#discussion_r154208585","pull_request_url":"https://api.github.com/repos/codeBelt/angular-routing/pulls/1","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/codeBelt/angular-routing/pulls/comments/154208585"},"html":{"href":"https://github.com/codeBelt/angular-routing/pull/1#discussion_r154208585"},"pull_request":{"href":"https://api.github.com/repos/codeBelt/angular-routing/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/codeBelt/angular-routing/pulls/1","id":155722441,"html_url":"https://github.com/codeBelt/angular-routing/pull/1","diff_url":"https://github.com/codeBelt/angular-routing/pull/1.diff","patch_url":"https://github.com/codeBelt/angular-routing/pull/1.patch","issue_url":"https://api.github.com/repos/codeBelt/angular-routing/issues/1","number":1,"state":"open","locked":false,"title":"add redux","user":{"login":"codeBelt","id":2893563,"avatar_url":"https://avatars0.githubusercontent.com/u/2893563?v=4","gravatar_id":"","url":"https://api.github.com/users/codeBelt","html_url":"https://github.com/codeBelt","followers_url":"https://api.github.com/users/codeBelt/followers","following_url":"https://api.github.com/users/codeBelt/following{/other_user}","gists_url":"https://api.github.com/users/codeBelt/gists{/gist_id}","starred_url":"https://api.github.com/users/codeBelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeBelt/subscriptions","organizations_url":"https://api.github.com/users/codeBelt/orgs","repos_url":"https://api.github.com/users/codeBelt/repos","events_url":"https://api.github.com/users/codeBelt/events{/privacy}","received_events_url":"https://api.github.com/users/codeBelt/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-11-30T21:22:47Z","updated_at":"2017-11-30T21:37:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"311c1c6f682489010f0a60a5e0cbad9f8586ce80","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/codeBelt/angular-routing/pulls/1/commits","review_comments_url":"https://api.github.com/repos/codeBelt/angular-routing/pulls/1/comments","review_comment_url":"https://api.github.com/repos/codeBelt/angular-routing/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codeBelt/angular-routing/issues/1/comments","statuses_url":"https://api.github.com/repos/codeBelt/angular-routing/statuses/16ac6dc56bac1afd6955b21ffeded8a840b88865","head":{"label":"codeBelt:ngrx","ref":"ngrx","sha":"16ac6dc56bac1afd6955b21ffeded8a840b88865","user":{"login":"codeBelt","id":2893563,"avatar_url":"https://avatars0.githubusercontent.com/u/2893563?v=4","gravatar_id":"","url":"https://api.github.com/users/codeBelt","html_url":"https://github.com/codeBelt","followers_url":"https://api.github.com/users/codeBelt/followers","following_url":"https://api.github.com/users/codeBelt/following{/other_user}","gists_url":"https://api.github.com/users/codeBelt/gists{/gist_id}","starred_url":"https://api.github.com/users/codeBelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeBelt/subscriptions","organizations_url":"https://api.github.com/users/codeBelt/orgs","repos_url":"https://api.github.com/users/codeBelt/repos","events_url":"https://api.github.com/users/codeBelt/events{/privacy}","received_events_url":"https://api.github.com/users/codeBelt/received_events","type":"User","site_admin":false},"repo":{"id":112125647,"name":"angular-routing","full_name":"codeBelt/angular-routing","owner":{"login":"codeBelt","id":2893563,"avatar_url":"https://avatars0.githubusercontent.com/u/2893563?v=4","gravatar_id":"","url":"https://api.github.com/users/codeBelt","html_url":"https://github.com/codeBelt","followers_url":"https://api.github.com/users/codeBelt/followers","following_url":"https://api.github.com/users/codeBelt/following{/other_user}","gists_url":"https://api.github.com/users/codeBelt/gists{/gist_id}","starred_url":"https://api.github.com/users/codeBelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeBelt/subscriptions","organizations_url":"https://api.github.com/users/codeBelt/orgs","repos_url":"https://api.github.com/users/codeBelt/repos","events_url":"https://api.github.com/users/codeBelt/events{/privacy}","received_events_url":"https://api.github.com/users/codeBelt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/codeBelt/angular-routing","description":null,"fork":false,"url":"https://api.github.com/repos/codeBelt/angular-routing","forks_url":"https://api.github.com/repos/codeBelt/angular-routing/forks","keys_url":"https://api.github.com/repos/codeBelt/angular-routing/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codeBelt/angular-routing/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codeBelt/angular-routing/teams","hooks_url":"https://api.github.com/repos/codeBelt/angular-routing/hooks","issue_events_url":"https://api.github.com/repos/codeBelt/angular-routing/issues/events{/number}","events_url":"https://api.github.com/repos/codeBelt/angular-routing/events","assignees_url":"https://api.github.com/repos/codeBelt/angular-routing/assignees{/user}","branches_url":"https://api.github.com/repos/codeBelt/angular-routing/branches{/branch}","tags_url":"https://api.github.com/repos/codeBelt/angular-routing/tags","blobs_url":"https://api.github.com/repos/codeBelt/angular-routing/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codeBelt/angular-routing/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codeBelt/angular-routing/git/refs{/sha}","trees_url":"https://api.github.com/repos/codeBelt/angular-routing/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codeBelt/angular-routing/statuses/{sha}","languages_url":"https://api.github.com/repos/codeBelt/angular-routing/languages","stargazers_url":"https://api.github.com/repos/codeBelt/angular-routing/stargazers","contributors_url":"https://api.github.com/repos/codeBelt/angular-routing/contributors","subscribers_url":"https://api.github.com/repos/codeBelt/angular-routing/subscribers","subscription_url":"https://api.github.com/repos/codeBelt/angular-routing/subscription","commits_url":"https://api.github.com/repos/codeBelt/angular-routing/commits{/sha}","git_commits_url":"https://api.github.com/repos/codeBelt/angular-routing/git/commits{/sha}","comments_url":"https://api.github.com/repos/codeBelt/angular-routing/comments{/number}","issue_comment_url":"https://api.github.com/repos/codeBelt/angular-routing/issues/comments{/number}","contents_url":"https://api.github.com/repos/codeBelt/angular-routing/contents/{+path}","compare_url":"https://api.github.com/repos/codeBelt/angular-routing/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codeBelt/angular-routing/merges","archive_url":"https://api.github.com/repos/codeBelt/angular-routing/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codeBelt/angular-routing/downloads","issues_url":"https://api.github.com/repos/codeBelt/angular-routing/issues{/number}","pulls_url":"https://api.github.com/repos/codeBelt/angular-routing/pulls{/number}","milestones_url":"https://api.github.com/repos/codeBelt/angular-routing/milestones{/number}","notifications_url":"https://api.github.com/repos/codeBelt/angular-routing/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codeBelt/angular-routing/labels{/name}","releases_url":"https://api.github.com/repos/codeBelt/angular-routing/releases{/id}","deployments_url":"https://api.github.com/repos/codeBelt/angular-routing/deployments","created_at":"2017-11-26T23:36:24Z","updated_at":"2017-11-26T23:43:02Z","pushed_at":"2017-11-30T21:35:25Z","git_url":"git://github.com/codeBelt/angular-routing.git","ssh_url":"git@github.com:codeBelt/angular-routing.git","clone_url":"https://github.com/codeBelt/angular-routing.git","svn_url":"https://github.com/codeBelt/angular-routing","homepage":null,"size":88,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"codeBelt:master","ref":"master","sha":"a793cd6445febd082ca99745acdf9ddc9a69bc09","user":{"login":"codeBelt","id":2893563,"avatar_url":"https://avatars0.githubusercontent.com/u/2893563?v=4","gravatar_id":"","url":"https://api.github.com/users/codeBelt","html_url":"https://github.com/codeBelt","followers_url":"https://api.github.com/users/codeBelt/followers","following_url":"https://api.github.com/users/codeBelt/following{/other_user}","gists_url":"https://api.github.com/users/codeBelt/gists{/gist_id}","starred_url":"https://api.github.com/users/codeBelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeBelt/subscriptions","organizations_url":"https://api.github.com/users/codeBelt/orgs","repos_url":"https://api.github.com/users/codeBelt/repos","events_url":"https://api.github.com/users/codeBelt/events{/privacy}","received_events_url":"https://api.github.com/users/codeBelt/received_events","type":"User","site_admin":false},"repo":{"id":112125647,"name":"angular-routing","full_name":"codeBelt/angular-routing","owner":{"login":"codeBelt","id":2893563,"avatar_url":"https://avatars0.githubusercontent.com/u/2893563?v=4","gravatar_id":"","url":"https://api.github.com/users/codeBelt","html_url":"https://github.com/codeBelt","followers_url":"https://api.github.com/users/codeBelt/followers","following_url":"https://api.github.com/users/codeBelt/following{/other_user}","gists_url":"https://api.github.com/users/codeBelt/gists{/gist_id}","starred_url":"https://api.github.com/users/codeBelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeBelt/subscriptions","organizations_url":"https://api.github.com/users/codeBelt/orgs","repos_url":"https://api.github.com/users/codeBelt/repos","events_url":"https://api.github.com/users/codeBelt/events{/privacy}","received_events_url":"https://api.github.com/users/codeBelt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/codeBelt/angular-routing","description":null,"fork":false,"url":"https://api.github.com/repos/codeBelt/angular-routing","forks_url":"https://api.github.com/repos/codeBelt/angular-routing/forks","keys_url":"https://api.github.com/repos/codeBelt/angular-routing/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codeBelt/angular-routing/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codeBelt/angular-routing/teams","hooks_url":"https://api.github.com/repos/codeBelt/angular-routing/hooks","issue_events_url":"https://api.github.com/repos/codeBelt/angular-routing/issues/events{/number}","events_url":"https://api.github.com/repos/codeBelt/angular-routing/events","assignees_url":"https://api.github.com/repos/codeBelt/angular-routing/assignees{/user}","branches_url":"https://api.github.com/repos/codeBelt/angular-routing/branches{/branch}","tags_url":"https://api.github.com/repos/codeBelt/angular-routing/tags","blobs_url":"https://api.github.com/repos/codeBelt/angular-routing/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codeBelt/angular-routing/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codeBelt/angular-routing/git/refs{/sha}","trees_url":"https://api.github.com/repos/codeBelt/angular-routing/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codeBelt/angular-routing/statuses/{sha}","languages_url":"https://api.github.com/repos/codeBelt/angular-routing/languages","stargazers_url":"https://api.github.com/repos/codeBelt/angular-routing/stargazers","contributors_url":"https://api.github.com/repos/codeBelt/angular-routing/contributors","subscribers_url":"https://api.github.com/repos/codeBelt/angular-routing/subscribers","subscription_url":"https://api.github.com/repos/codeBelt/angular-routing/subscription","commits_url":"https://api.github.com/repos/codeBelt/angular-routing/commits{/sha}","git_commits_url":"https://api.github.com/repos/codeBelt/angular-routing/git/commits{/sha}","comments_url":"https://api.github.com/repos/codeBelt/angular-routing/comments{/number}","issue_comment_url":"https://api.github.com/repos/codeBelt/angular-routing/issues/comments{/number}","contents_url":"https://api.github.com/repos/codeBelt/angular-routing/contents/{+path}","compare_url":"https://api.github.com/repos/codeBelt/angular-routing/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codeBelt/angular-routing/merges","archive_url":"https://api.github.com/repos/codeBelt/angular-routing/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codeBelt/angular-routing/downloads","issues_url":"https://api.github.com/repos/codeBelt/angular-routing/issues{/number}","pulls_url":"https://api.github.com/repos/codeBelt/angular-routing/pulls{/number}","milestones_url":"https://api.github.com/repos/codeBelt/angular-routing/milestones{/number}","notifications_url":"https://api.github.com/repos/codeBelt/angular-routing/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codeBelt/angular-routing/labels{/name}","releases_url":"https://api.github.com/repos/codeBelt/angular-routing/releases{/id}","deployments_url":"https://api.github.com/repos/codeBelt/angular-routing/deployments","created_at":"2017-11-26T23:36:24Z","updated_at":"2017-11-26T23:43:02Z","pushed_at":"2017-11-30T21:35:25Z","git_url":"git://github.com/codeBelt/angular-routing.git","ssh_url":"git@github.com:codeBelt/angular-routing.git","clone_url":"https://github.com/codeBelt/angular-routing.git","svn_url":"https://github.com/codeBelt/angular-routing","homepage":null,"size":88,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codeBelt/angular-routing/pulls/1"},"html":{"href":"https://github.com/codeBelt/angular-routing/pull/1"},"issue":{"href":"https://api.github.com/repos/codeBelt/angular-routing/issues/1"},"comments":{"href":"https://api.github.com/repos/codeBelt/angular-routing/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/codeBelt/angular-routing/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/codeBelt/angular-routing/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codeBelt/angular-routing/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/codeBelt/angular-routing/statuses/16ac6dc56bac1afd6955b21ffeded8a840b88865"}},"author_association":"OWNER"}}
{"actor":{"display_login":"ccheney"}}