{"action":"created","comment":{"url":"https://api.github.com/repos/tienpxx/GitEx/pulls/comments/239710925","pull_request_review_id":182570216,"id":239710925,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzOTcxMDkyNQ==","diff_hunk":"@@ -0,0 +1,82 @@\n+//\n+//  SearchViewController.swift\n+//  MoviePlay\n+//\n+//  Created by tuyente on 10/3/18.\n+//  Copyright © 2018 tuyente. All rights reserved.\n+//\n+\n+import UIKit\n+import Reusable\n+\n+class SearchViewController: UIViewController, UISearchBarDelegate, Reusable {\n+\n+    @IBOutlet private weak var mySearchBar: UISearchBar!\n+    @IBOutlet private weak var myTableSearch: UITableView!\n+    var timer: Timer?\n+    var movies = [Movie]()\n+    \n+    override func viewDidLoad() {\n+        super.viewDidLoad()\n+        setupSearch()\n+    }\n+    \n+    func setupSearch() {\n+        myTableSearch.delegate = self\n+        myTableSearch.dataSource = self\n+        mySearchBar.delegate = self\n+        mySearchBar.returnKeyType = .done\n+    }\n+    \n+    func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) {\n+        myTableSearch.isUserInteractionEnabled = false\n+        if timer != nil {\n+            timer?.invalidate()\n+        }\n+        guard let text = searchBar.text else {\n+            self.movies = [Movie]()\n+            self.myTableSearch.reloadData()\n+            return\n+        }\n+        timer = Timer.scheduledTimer(withTimeInterval: 0.5, repeats: false) { _ in\n+            self.movies = [Movie]()\n+            self.myTableSearch.reloadData()\n+            self.myTableSearch.isUserInteractionEnabled = true\n+            self.loadData(query: text)\n+        }\n+    }\n+    \n+    private func loadData(query: String) {\n+        let request = GetSearchListRequest( query: query, page: 1)\n+        APIService.share.request(input: request) { [weak self] (response: MovieResponse?, error) in\n+            guard let `self` = self else { return }\n+            if let responseMoviee = response  {\n+                self.movies = responseMoviee.movies\n+                self.myTableSearch.reloadData()\n+            }\n+        }\n+    }\n+}\n+\n+extension SearchViewController: UITableViewDataSource, UITableViewDelegate {\n+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {\n+        return movies.count\n+    }\n+    ","path":"ScreenSearch/SearchViewController.swift","position":65,"original_position":65,"commit_id":"31f99ecca7dab8fdd3de3dacf11292ebfa99a9eb","original_commit_id":"31f99ecca7dab8fdd3de3dacf11292ebfa99a9eb","user":{"login":"houndci-bot","id":6697940,"node_id":"MDQ6VXNlcjY2OTc5NDA=","avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)","created_at":"2018-12-07T07:05:36Z","updated_at":"2018-12-07T07:05:38Z","html_url":"https://github.com/tienpxx/GitEx/pull/3#discussion_r239710925","pull_request_url":"https://api.github.com/repos/tienpxx/GitEx/pulls/3","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/tienpxx/GitEx/pulls/comments/239710925"},"html":{"href":"https://github.com/tienpxx/GitEx/pull/3#discussion_r239710925"},"pull_request":{"href":"https://api.github.com/repos/tienpxx/GitEx/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/tienpxx/GitEx/pulls/3","id":236773420,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM2NzczNDIw","html_url":"https://github.com/tienpxx/GitEx/pull/3","diff_url":"https://github.com/tienpxx/GitEx/pull/3.diff","patch_url":"https://github.com/tienpxx/GitEx/pull/3.patch","issue_url":"https://api.github.com/repos/tienpxx/GitEx/issues/3","number":3,"state":"open","locked":false,"title":"123232","user":{"login":"tienpxx","id":45550309,"node_id":"MDQ6VXNlcjQ1NTUwMzA5","avatar_url":"https://avatars2.githubusercontent.com/u/45550309?v=4","gravatar_id":"","url":"https://api.github.com/users/tienpxx","html_url":"https://github.com/tienpxx","followers_url":"https://api.github.com/users/tienpxx/followers","following_url":"https://api.github.com/users/tienpxx/following{/other_user}","gists_url":"https://api.github.com/users/tienpxx/gists{/gist_id}","starred_url":"https://api.github.com/users/tienpxx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tienpxx/subscriptions","organizations_url":"https://api.github.com/users/tienpxx/orgs","repos_url":"https://api.github.com/users/tienpxx/repos","events_url":"https://api.github.com/users/tienpxx/events{/privacy}","received_events_url":"https://api.github.com/users/tienpxx/received_events","type":"User","site_admin":false},"body":"asdsad","created_at":"2018-12-07T07:05:24Z","updated_at":"2018-12-07T07:05:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"157bba5ffc6ffa763ae6aa9ccd213d2ae1df9dcc","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/tienpxx/GitEx/pulls/3/commits","review_comments_url":"https://api.github.com/repos/tienpxx/GitEx/pulls/3/comments","review_comment_url":"https://api.github.com/repos/tienpxx/GitEx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tienpxx/GitEx/issues/3/comments","statuses_url":"https://api.github.com/repos/tienpxx/GitEx/statuses/31f99ecca7dab8fdd3de3dacf11292ebfa99a9eb","head":{"label":"tienpxx:test","ref":"test","sha":"31f99ecca7dab8fdd3de3dacf11292ebfa99a9eb","user":{"login":"tienpxx","id":45550309,"node_id":"MDQ6VXNlcjQ1NTUwMzA5","avatar_url":"https://avatars2.githubusercontent.com/u/45550309?v=4","gravatar_id":"","url":"https://api.github.com/users/tienpxx","html_url":"https://github.com/tienpxx","followers_url":"https://api.github.com/users/tienpxx/followers","following_url":"https://api.github.com/users/tienpxx/following{/other_user}","gists_url":"https://api.github.com/users/tienpxx/gists{/gist_id}","starred_url":"https://api.github.com/users/tienpxx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tienpxx/subscriptions","organizations_url":"https://api.github.com/users/tienpxx/orgs","repos_url":"https://api.github.com/users/tienpxx/repos","events_url":"https://api.github.com/users/tienpxx/events{/privacy}","received_events_url":"https://api.github.com/users/tienpxx/received_events","type":"User","site_admin":false},"repo":{"id":160143509,"node_id":"MDEwOlJlcG9zaXRvcnkxNjAxNDM1MDk=","name":"GitEx","full_name":"tienpxx/GitEx","private":false,"owner":{"login":"tienpxx","id":45550309,"node_id":"MDQ6VXNlcjQ1NTUwMzA5","avatar_url":"https://avatars2.githubusercontent.com/u/45550309?v=4","gravatar_id":"","url":"https://api.github.com/users/tienpxx","html_url":"https://github.com/tienpxx","followers_url":"https://api.github.com/users/tienpxx/followers","following_url":"https://api.github.com/users/tienpxx/following{/other_user}","gists_url":"https://api.github.com/users/tienpxx/gists{/gist_id}","starred_url":"https://api.github.com/users/tienpxx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tienpxx/subscriptions","organizations_url":"https://api.github.com/users/tienpxx/orgs","repos_url":"https://api.github.com/users/tienpxx/repos","events_url":"https://api.github.com/users/tienpxx/events{/privacy}","received_events_url":"https://api.github.com/users/tienpxx/received_events","type":"User","site_admin":false},"html_url":"https://github.com/tienpxx/GitEx","description":null,"fork":false,"url":"https://api.github.com/repos/tienpxx/GitEx","forks_url":"https://api.github.com/repos/tienpxx/GitEx/forks","keys_url":"https://api.github.com/repos/tienpxx/GitEx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tienpxx/GitEx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tienpxx/GitEx/teams","hooks_url":"https://api.github.com/repos/tienpxx/GitEx/hooks","issue_events_url":"https://api.github.com/repos/tienpxx/GitEx/issues/events{/number}","events_url":"https://api.github.com/repos/tienpxx/GitEx/events","assignees_url":"https://api.github.com/repos/tienpxx/GitEx/assignees{/user}","branches_url":"https://api.github.com/repos/tienpxx/GitEx/branches{/branch}","tags_url":"https://api.github.com/repos/tienpxx/GitEx/tags","blobs_url":"https://api.github.com/repos/tienpxx/GitEx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tienpxx/GitEx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tienpxx/GitEx/git/refs{/sha}","trees_url":"https://api.github.com/repos/tienpxx/GitEx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tienpxx/GitEx/statuses/{sha}","languages_url":"https://api.github.com/repos/tienpxx/GitEx/languages","stargazers_url":"https://api.github.com/repos/tienpxx/GitEx/stargazers","contributors_url":"https://api.github.com/repos/tienpxx/GitEx/contributors","subscribers_url":"https://api.github.com/repos/tienpxx/GitEx/subscribers","subscription_url":"https://api.github.com/repos/tienpxx/GitEx/subscription","commits_url":"https://api.github.com/repos/tienpxx/GitEx/commits{/sha}","git_commits_url":"https://api.github.com/repos/tienpxx/GitEx/git/commits{/sha}","comments_url":"https://api.github.com/repos/tienpxx/GitEx/comments{/number}","issue_comment_url":"https://api.github.com/repos/tienpxx/GitEx/issues/comments{/number}","contents_url":"https://api.github.com/repos/tienpxx/GitEx/contents/{+path}","compare_url":"https://api.github.com/repos/tienpxx/GitEx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tienpxx/GitEx/merges","archive_url":"https://api.github.com/repos/tienpxx/GitEx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tienpxx/GitEx/downloads","issues_url":"https://api.github.com/repos/tienpxx/GitEx/issues{/number}","pulls_url":"https://api.github.com/repos/tienpxx/GitEx/pulls{/number}","milestones_url":"https://api.github.com/repos/tienpxx/GitEx/milestones{/number}","notifications_url":"https://api.github.com/repos/tienpxx/GitEx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tienpxx/GitEx/labels{/name}","releases_url":"https://api.github.com/repos/tienpxx/GitEx/releases{/id}","deployments_url":"https://api.github.com/repos/tienpxx/GitEx/deployments","created_at":"2018-12-03T06:31:58Z","updated_at":"2018-12-06T02:09:43Z","pushed_at":"2018-12-07T07:05:24Z","git_url":"git://github.com/tienpxx/GitEx.git","ssh_url":"git@github.com:tienpxx/GitEx.git","clone_url":"https://github.com/tienpxx/GitEx.git","svn_url":"https://github.com/tienpxx/GitEx","homepage":null,"size":57,"stargazers_count":0,"watchers_count":0,"language":"Swift","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":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"tienpxx:master","ref":"master","sha":"3fde51c8b9626caf007ef9efaa8855fd119f0656","user":{"login":"tienpxx","id":45550309,"node_id":"MDQ6VXNlcjQ1NTUwMzA5","avatar_url":"https://avatars2.githubusercontent.com/u/45550309?v=4","gravatar_id":"","url":"https://api.github.com/users/tienpxx","html_url":"https://github.com/tienpxx","followers_url":"https://api.github.com/users/tienpxx/followers","following_url":"https://api.github.com/users/tienpxx/following{/other_user}","gists_url":"https://api.github.com/users/tienpxx/gists{/gist_id}","starred_url":"https://api.github.com/users/tienpxx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tienpxx/subscriptions","organizations_url":"https://api.github.com/users/tienpxx/orgs","repos_url":"https://api.github.com/users/tienpxx/repos","events_url":"https://api.github.com/users/tienpxx/events{/privacy}","received_events_url":"https://api.github.com/users/tienpxx/received_events","type":"User","site_admin":false},"repo":{"id":160143509,"node_id":"MDEwOlJlcG9zaXRvcnkxNjAxNDM1MDk=","name":"GitEx","full_name":"tienpxx/GitEx","private":false,"owner":{"login":"tienpxx","id":45550309,"node_id":"MDQ6VXNlcjQ1NTUwMzA5","avatar_url":"https://avatars2.githubusercontent.com/u/45550309?v=4","gravatar_id":"","url":"https://api.github.com/users/tienpxx","html_url":"https://github.com/tienpxx","followers_url":"https://api.github.com/users/tienpxx/followers","following_url":"https://api.github.com/users/tienpxx/following{/other_user}","gists_url":"https://api.github.com/users/tienpxx/gists{/gist_id}","starred_url":"https://api.github.com/users/tienpxx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tienpxx/subscriptions","organizations_url":"https://api.github.com/users/tienpxx/orgs","repos_url":"https://api.github.com/users/tienpxx/repos","events_url":"https://api.github.com/users/tienpxx/events{/privacy}","received_events_url":"https://api.github.com/users/tienpxx/received_events","type":"User","site_admin":false},"html_url":"https://github.com/tienpxx/GitEx","description":null,"fork":false,"url":"https://api.github.com/repos/tienpxx/GitEx","forks_url":"https://api.github.com/repos/tienpxx/GitEx/forks","keys_url":"https://api.github.com/repos/tienpxx/GitEx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tienpxx/GitEx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tienpxx/GitEx/teams","hooks_url":"https://api.github.com/repos/tienpxx/GitEx/hooks","issue_events_url":"https://api.github.com/repos/tienpxx/GitEx/issues/events{/number}","events_url":"https://api.github.com/repos/tienpxx/GitEx/events","assignees_url":"https://api.github.com/repos/tienpxx/GitEx/assignees{/user}","branches_url":"https://api.github.com/repos/tienpxx/GitEx/branches{/branch}","tags_url":"https://api.github.com/repos/tienpxx/GitEx/tags","blobs_url":"https://api.github.com/repos/tienpxx/GitEx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tienpxx/GitEx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tienpxx/GitEx/git/refs{/sha}","trees_url":"https://api.github.com/repos/tienpxx/GitEx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tienpxx/GitEx/statuses/{sha}","languages_url":"https://api.github.com/repos/tienpxx/GitEx/languages","stargazers_url":"https://api.github.com/repos/tienpxx/GitEx/stargazers","contributors_url":"https://api.github.com/repos/tienpxx/GitEx/contributors","subscribers_url":"https://api.github.com/repos/tienpxx/GitEx/subscribers","subscription_url":"https://api.github.com/repos/tienpxx/GitEx/subscription","commits_url":"https://api.github.com/repos/tienpxx/GitEx/commits{/sha}","git_commits_url":"https://api.github.com/repos/tienpxx/GitEx/git/commits{/sha}","comments_url":"https://api.github.com/repos/tienpxx/GitEx/comments{/number}","issue_comment_url":"https://api.github.com/repos/tienpxx/GitEx/issues/comments{/number}","contents_url":"https://api.github.com/repos/tienpxx/GitEx/contents/{+path}","compare_url":"https://api.github.com/repos/tienpxx/GitEx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tienpxx/GitEx/merges","archive_url":"https://api.github.com/repos/tienpxx/GitEx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tienpxx/GitEx/downloads","issues_url":"https://api.github.com/repos/tienpxx/GitEx/issues{/number}","pulls_url":"https://api.github.com/repos/tienpxx/GitEx/pulls{/number}","milestones_url":"https://api.github.com/repos/tienpxx/GitEx/milestones{/number}","notifications_url":"https://api.github.com/repos/tienpxx/GitEx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tienpxx/GitEx/labels{/name}","releases_url":"https://api.github.com/repos/tienpxx/GitEx/releases{/id}","deployments_url":"https://api.github.com/repos/tienpxx/GitEx/deployments","created_at":"2018-12-03T06:31:58Z","updated_at":"2018-12-06T02:09:43Z","pushed_at":"2018-12-07T07:05:24Z","git_url":"git://github.com/tienpxx/GitEx.git","ssh_url":"git@github.com:tienpxx/GitEx.git","clone_url":"https://github.com/tienpxx/GitEx.git","svn_url":"https://github.com/tienpxx/GitEx","homepage":null,"size":57,"stargazers_count":0,"watchers_count":0,"language":"Swift","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":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tienpxx/GitEx/pulls/3"},"html":{"href":"https://github.com/tienpxx/GitEx/pull/3"},"issue":{"href":"https://api.github.com/repos/tienpxx/GitEx/issues/3"},"comments":{"href":"https://api.github.com/repos/tienpxx/GitEx/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/tienpxx/GitEx/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/tienpxx/GitEx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tienpxx/GitEx/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/tienpxx/GitEx/statuses/31f99ecca7dab8fdd3de3dacf11292ebfa99a9eb"}},"author_association":"OWNER"}}
{"actor":{"display_login":"houndci-bot"}}