{"action":"created","comment":{"url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/pulls/comments/359312226","pull_request_review_id":333928432,"id":359312226,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM1OTMxMjIyNg==","diff_hunk":"@@ -0,0 +1,61 @@\n+import actionTypes from \"./actionTypes\";\n+import {\n+  APIKey\n+} from \"../API_Key\";\n+\n+export const fetchMovies = text => dispatch => {\n+  dispatch({\n+    type: actionTypes.SET_LOADING_STATE,\n+  });\n+\n+  fetch(`https://www.omdbapi.com/?apikey=${APIKey}&s=${text}&type=movie`)\n+    .then(response => response.json())\n+    .then(result => {\n+      console.log(result);\n+      dispatch({\n+        type: actionTypes.MOVIES_LIST_RECEIVED,\n+        payload: result.Search\n+      });\n+    })\n+    .catch(err => console.log(err));\n+};\n+\n+export const fetchMovie = id => dispatch => {\n+  dispatch({\n+    type: actionTypes.SET_LOADING_STATE,\n+  });\n+\n+  fetch(`https://www.omdbapi.com/?apikey=${APIKey}&i=${id}&plot=full`)\n+    .then(response => response.json())\n+    .then(movieDetails => {\n+      console.log(movieDetails);\n+      dispatch({\n+        type: actionTypes.FULL_DESCRIPTION_MOVIE_RECEIVED,\n+        payload: movieDetails\n+      })\n+    })\n+    .catch(err => console.log(err));\n+};\n+\n+export const openDP = movie => dispatch => {\n+  dispatch({\n+    type: actionTypes.OPEN_DP,\n+    payload: {\n+      movie,\n+    }\n+  });\n+};\n+\n+export const addToFavList = movie => dispatch => {\n+  dispatch({\n+    type: actionTypes.ADD_TO_FAV_MOVIES_LIST,\n+    payload: movie,\n+  });\n+};\n+\n+export const deleteFromFavList = movie => dispatch => {\n+  dispatch({\n+    type: actionTypes.DELETE_FROM_FAV_MOVIES_LIST,\n+    payload: movie,\n+  });\n+};","path":"src/actions/searchActions.js","position":61,"original_position":61,"commit_id":"bddaef2c163fb2ee5d68e9c8875b72d15d9aa057","original_commit_id":"bddaef2c163fb2ee5d68e9c8875b72d15d9aa057","user":{"login":"19aliaksandr90","id":56079976,"node_id":"MDQ6VXNlcjU2MDc5OTc2","avatar_url":"https://avatars2.githubusercontent.com/u/56079976?v=4","gravatar_id":"","url":"https://api.github.com/users/19aliaksandr90","html_url":"https://github.com/19aliaksandr90","followers_url":"https://api.github.com/users/19aliaksandr90/followers","following_url":"https://api.github.com/users/19aliaksandr90/following{/other_user}","gists_url":"https://api.github.com/users/19aliaksandr90/gists{/gist_id}","starred_url":"https://api.github.com/users/19aliaksandr90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/19aliaksandr90/subscriptions","organizations_url":"https://api.github.com/users/19aliaksandr90/orgs","repos_url":"https://api.github.com/users/19aliaksandr90/repos","events_url":"https://api.github.com/users/19aliaksandr90/events{/privacy}","received_events_url":"https://api.github.com/users/19aliaksandr90/received_events","type":"User","site_admin":false},"body":"OK. Create a simple redux actions.","created_at":"2019-12-18T12:15:40Z","updated_at":"2019-12-18T12:15:40Z","html_url":"https://github.com/19aliaksandr90/omdb-redux-thunk/pull/4#discussion_r359312226","pull_request_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/pulls/4","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/pulls/comments/359312226"},"html":{"href":"https://github.com/19aliaksandr90/omdb-redux-thunk/pull/4#discussion_r359312226"},"pull_request":{"href":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/pulls/4"}},"in_reply_to_id":359019711},"pull_request":{"url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/pulls/4","id":354169850,"node_id":"MDExOlB1bGxSZXF1ZXN0MzU0MTY5ODUw","html_url":"https://github.com/19aliaksandr90/omdb-redux-thunk/pull/4","diff_url":"https://github.com/19aliaksandr90/omdb-redux-thunk/pull/4.diff","patch_url":"https://github.com/19aliaksandr90/omdb-redux-thunk/pull/4.patch","issue_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/issues/4","number":4,"state":"open","locked":false,"title":"Redux redux thunk","user":{"login":"19aliaksandr90","id":56079976,"node_id":"MDQ6VXNlcjU2MDc5OTc2","avatar_url":"https://avatars2.githubusercontent.com/u/56079976?v=4","gravatar_id":"","url":"https://api.github.com/users/19aliaksandr90","html_url":"https://github.com/19aliaksandr90","followers_url":"https://api.github.com/users/19aliaksandr90/followers","following_url":"https://api.github.com/users/19aliaksandr90/following{/other_user}","gists_url":"https://api.github.com/users/19aliaksandr90/gists{/gist_id}","starred_url":"https://api.github.com/users/19aliaksandr90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/19aliaksandr90/subscriptions","organizations_url":"https://api.github.com/users/19aliaksandr90/orgs","repos_url":"https://api.github.com/users/19aliaksandr90/repos","events_url":"https://api.github.com/users/19aliaksandr90/events{/privacy}","received_events_url":"https://api.github.com/users/19aliaksandr90/received_events","type":"User","site_admin":false},"body":"","created_at":"2019-12-17T15:36:26Z","updated_at":"2019-12-18T12:15:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ea292f2277ca962e29e3ab98cf7c07e3a7a4d7ff","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/pulls/4/commits","review_comments_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/pulls/4/comments","review_comment_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/issues/4/comments","statuses_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/statuses/bddaef2c163fb2ee5d68e9c8875b72d15d9aa057","head":{"label":"19aliaksandr90:redux-redux-thunk","ref":"redux-redux-thunk","sha":"bddaef2c163fb2ee5d68e9c8875b72d15d9aa057","user":{"login":"19aliaksandr90","id":56079976,"node_id":"MDQ6VXNlcjU2MDc5OTc2","avatar_url":"https://avatars2.githubusercontent.com/u/56079976?v=4","gravatar_id":"","url":"https://api.github.com/users/19aliaksandr90","html_url":"https://github.com/19aliaksandr90","followers_url":"https://api.github.com/users/19aliaksandr90/followers","following_url":"https://api.github.com/users/19aliaksandr90/following{/other_user}","gists_url":"https://api.github.com/users/19aliaksandr90/gists{/gist_id}","starred_url":"https://api.github.com/users/19aliaksandr90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/19aliaksandr90/subscriptions","organizations_url":"https://api.github.com/users/19aliaksandr90/orgs","repos_url":"https://api.github.com/users/19aliaksandr90/repos","events_url":"https://api.github.com/users/19aliaksandr90/events{/privacy}","received_events_url":"https://api.github.com/users/19aliaksandr90/received_events","type":"User","site_admin":false},"repo":{"id":226058947,"node_id":"MDEwOlJlcG9zaXRvcnkyMjYwNTg5NDc=","name":"omdb-redux-thunk","full_name":"19aliaksandr90/omdb-redux-thunk","private":false,"owner":{"login":"19aliaksandr90","id":56079976,"node_id":"MDQ6VXNlcjU2MDc5OTc2","avatar_url":"https://avatars2.githubusercontent.com/u/56079976?v=4","gravatar_id":"","url":"https://api.github.com/users/19aliaksandr90","html_url":"https://github.com/19aliaksandr90","followers_url":"https://api.github.com/users/19aliaksandr90/followers","following_url":"https://api.github.com/users/19aliaksandr90/following{/other_user}","gists_url":"https://api.github.com/users/19aliaksandr90/gists{/gist_id}","starred_url":"https://api.github.com/users/19aliaksandr90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/19aliaksandr90/subscriptions","organizations_url":"https://api.github.com/users/19aliaksandr90/orgs","repos_url":"https://api.github.com/users/19aliaksandr90/repos","events_url":"https://api.github.com/users/19aliaksandr90/events{/privacy}","received_events_url":"https://api.github.com/users/19aliaksandr90/received_events","type":"User","site_admin":false},"html_url":"https://github.com/19aliaksandr90/omdb-redux-thunk","description":null,"fork":false,"url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk","forks_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/forks","keys_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/teams","hooks_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/hooks","issue_events_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/issues/events{/number}","events_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/events","assignees_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/assignees{/user}","branches_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/branches{/branch}","tags_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/tags","blobs_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/git/refs{/sha}","trees_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/statuses/{sha}","languages_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/languages","stargazers_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/stargazers","contributors_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/contributors","subscribers_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/subscribers","subscription_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/subscription","commits_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/commits{/sha}","git_commits_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/git/commits{/sha}","comments_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/comments{/number}","issue_comment_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/issues/comments{/number}","contents_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/contents/{+path}","compare_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/merges","archive_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/downloads","issues_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/issues{/number}","pulls_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/pulls{/number}","milestones_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/milestones{/number}","notifications_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/labels{/name}","releases_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/releases{/id}","deployments_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/deployments","created_at":"2019-12-05T08:59:58Z","updated_at":"2019-12-16T08:44:22Z","pushed_at":"2019-12-17T15:36:27Z","git_url":"git://github.com/19aliaksandr90/omdb-redux-thunk.git","ssh_url":"git@github.com:19aliaksandr90/omdb-redux-thunk.git","clone_url":"https://github.com/19aliaksandr90/omdb-redux-thunk.git","svn_url":"https://github.com/19aliaksandr90/omdb-redux-thunk","homepage":null,"size":250,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"19aliaksandr90:master","ref":"master","sha":"3c7250f555bfabdcd67eac34bdf12169d5001dac","user":{"login":"19aliaksandr90","id":56079976,"node_id":"MDQ6VXNlcjU2MDc5OTc2","avatar_url":"https://avatars2.githubusercontent.com/u/56079976?v=4","gravatar_id":"","url":"https://api.github.com/users/19aliaksandr90","html_url":"https://github.com/19aliaksandr90","followers_url":"https://api.github.com/users/19aliaksandr90/followers","following_url":"https://api.github.com/users/19aliaksandr90/following{/other_user}","gists_url":"https://api.github.com/users/19aliaksandr90/gists{/gist_id}","starred_url":"https://api.github.com/users/19aliaksandr90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/19aliaksandr90/subscriptions","organizations_url":"https://api.github.com/users/19aliaksandr90/orgs","repos_url":"https://api.github.com/users/19aliaksandr90/repos","events_url":"https://api.github.com/users/19aliaksandr90/events{/privacy}","received_events_url":"https://api.github.com/users/19aliaksandr90/received_events","type":"User","site_admin":false},"repo":{"id":226058947,"node_id":"MDEwOlJlcG9zaXRvcnkyMjYwNTg5NDc=","name":"omdb-redux-thunk","full_name":"19aliaksandr90/omdb-redux-thunk","private":false,"owner":{"login":"19aliaksandr90","id":56079976,"node_id":"MDQ6VXNlcjU2MDc5OTc2","avatar_url":"https://avatars2.githubusercontent.com/u/56079976?v=4","gravatar_id":"","url":"https://api.github.com/users/19aliaksandr90","html_url":"https://github.com/19aliaksandr90","followers_url":"https://api.github.com/users/19aliaksandr90/followers","following_url":"https://api.github.com/users/19aliaksandr90/following{/other_user}","gists_url":"https://api.github.com/users/19aliaksandr90/gists{/gist_id}","starred_url":"https://api.github.com/users/19aliaksandr90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/19aliaksandr90/subscriptions","organizations_url":"https://api.github.com/users/19aliaksandr90/orgs","repos_url":"https://api.github.com/users/19aliaksandr90/repos","events_url":"https://api.github.com/users/19aliaksandr90/events{/privacy}","received_events_url":"https://api.github.com/users/19aliaksandr90/received_events","type":"User","site_admin":false},"html_url":"https://github.com/19aliaksandr90/omdb-redux-thunk","description":null,"fork":false,"url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk","forks_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/forks","keys_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/teams","hooks_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/hooks","issue_events_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/issues/events{/number}","events_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/events","assignees_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/assignees{/user}","branches_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/branches{/branch}","tags_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/tags","blobs_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/git/refs{/sha}","trees_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/statuses/{sha}","languages_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/languages","stargazers_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/stargazers","contributors_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/contributors","subscribers_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/subscribers","subscription_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/subscription","commits_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/commits{/sha}","git_commits_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/git/commits{/sha}","comments_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/comments{/number}","issue_comment_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/issues/comments{/number}","contents_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/contents/{+path}","compare_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/merges","archive_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/downloads","issues_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/issues{/number}","pulls_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/pulls{/number}","milestones_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/milestones{/number}","notifications_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/labels{/name}","releases_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/releases{/id}","deployments_url":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/deployments","created_at":"2019-12-05T08:59:58Z","updated_at":"2019-12-16T08:44:22Z","pushed_at":"2019-12-17T15:36:27Z","git_url":"git://github.com/19aliaksandr90/omdb-redux-thunk.git","ssh_url":"git@github.com:19aliaksandr90/omdb-redux-thunk.git","clone_url":"https://github.com/19aliaksandr90/omdb-redux-thunk.git","svn_url":"https://github.com/19aliaksandr90/omdb-redux-thunk","homepage":null,"size":250,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":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/19aliaksandr90/omdb-redux-thunk/pulls/4"},"html":{"href":"https://github.com/19aliaksandr90/omdb-redux-thunk/pull/4"},"issue":{"href":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/issues/4"},"comments":{"href":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/19aliaksandr90/omdb-redux-thunk/statuses/bddaef2c163fb2ee5d68e9c8875b72d15d9aa057"}},"author_association":"OWNER"}}
{"actor":{"display_login":"19aliaksandr90"}}