{"action":"created","issue":{"url":"https://api.github.com/repos/andela/ah-jarvis/issues/27","repository_url":"https://api.github.com/repos/andela/ah-jarvis","labels_url":"https://api.github.com/repos/andela/ah-jarvis/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/andela/ah-jarvis/issues/27/comments","events_url":"https://api.github.com/repos/andela/ah-jarvis/issues/27/events","html_url":"https://github.com/andela/ah-jarvis/pull/27","id":350844892,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4NTg5NjA2","number":27,"title":"Ft search 159054021","user":{"login":"Duncanian","id":25982160,"node_id":"MDQ6VXNlcjI1OTgyMTYw","avatar_url":"https://avatars3.githubusercontent.com/u/25982160?v=4","gravatar_id":"","url":"https://api.github.com/users/Duncanian","html_url":"https://github.com/Duncanian","followers_url":"https://api.github.com/users/Duncanian/followers","following_url":"https://api.github.com/users/Duncanian/following{/other_user}","gists_url":"https://api.github.com/users/Duncanian/gists{/gist_id}","starred_url":"https://api.github.com/users/Duncanian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Duncanian/subscriptions","organizations_url":"https://api.github.com/users/Duncanian/orgs","repos_url":"https://api.github.com/users/Duncanian/repos","events_url":"https://api.github.com/users/Duncanian/events{/privacy}","received_events_url":"https://api.github.com/users/Duncanian/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2018-08-15T15:04:30Z","updated_at":"2018-08-16T15:06:22Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/andela/ah-jarvis/pulls/27","html_url":"https://github.com/andela/ah-jarvis/pull/27","diff_url":"https://github.com/andela/ah-jarvis/pull/27.diff","patch_url":"https://github.com/andela/ah-jarvis/pull/27.patch"},"body":"**What does this PR do?**\r\n\r\n- Implements filter functionality by author, article title and tag\r\n\r\n- Implements search functionality by keywords from author, article title, article body, article description and tag\r\n\r\n**background Information.**\r\nEnables a user to filter or search articles of their preference by author, article title, article body, article description and tag\r\n\r\n**Install dependencies**\r\n`pip install -r requirements.txt`\r\n\r\n**How To Manually Test?**\r\n\r\nPull ft-search-159054021\r\n`git pull ft-search-159054021`\r\n\r\nCheckout to ft-search-159054021 branch\r\n`git checkout ft-search-159054021`\r\n\r\nUpdate database by running migrations.\r\n   `python manage.py makemigrations`\r\n   `python manage.py migrate`\r\n\r\nStart the server\r\n`python manage.py runserver`\r\n\r\nTest the endpoints on postman.\r\n\r\nRun test coverage\r\n`coverage run manage.py test`\r\n`coverage report`\r\n\r\n**Affected Endpoints:**\r\n\r\n`GET /api/articles`\r\n\r\n***Filter***\r\n\r\n**Filter by author**\r\n`GET /api/articles?author__id=<author_id>`\r\n\r\n**Filter by title**\r\n`GET /api/articles?title=<title>`\r\n\r\n**Filter by tag**\r\n`GET /api/articles?tags__tag=<tag>`\r\n\r\nRESPONSE\r\n```\r\n[\r\n    {\r\n        \"title\": \"How to train your dragon 100\",\r\n        \"slug\": \"how-to-train-your-dragon-100-5o62zifwg0\",\r\n        \"body\": \"You have to believe\",\r\n        \"description\": \"Ever wonder how?\",\r\n        \"image_url\": null,\r\n        \"created_at\": \"2018-08-15T10:56:55.808407Z\",\r\n        \"updated_at\": \"2018-08-15T10:56:55.808433Z\",\r\n        \"author\": {\r\n            \"username\": \"ian2\",\r\n            \"bio\": \"\",\r\n            \"image\": \"https://static.productionready.io/images/smiley-cyrus.jpg\"\r\n        },\r\n        \"likes\": [],\r\n        \"dislikes\": [],\r\n        \"likes_count\": 0,\r\n        \"dislikes_count\": 0,\r\n        \"favorited\": false,\r\n        \"favoriteCount\": 0,\r\n        \"tagList\": [\r\n            \"vikings\",\r\n            \"dragon-training\",\r\n            \"dragon\",\r\n            \"dragons\"\r\n        ]\r\n    }\r\n]\r\n\r\n```\r\n\r\n\r\n***Search***\r\n\r\n**Search by author, article title, article body, article description and tag **\r\n`GET /api/articles?search=<keyword>`\r\n\r\nRESPONSE\r\n```\r\n[\r\n    {\r\n        \"title\": \"How to train your dragon 100\",\r\n        \"slug\": \"how-to-train-your-dragon-100-5o62zifwg0\",\r\n        \"body\": \"You have to believe\",\r\n        \"description\": \"Ever wonder how?\",\r\n        \"image_url\": null,\r\n        \"created_at\": \"2018-08-15T10:56:55.808407Z\",\r\n        \"updated_at\": \"2018-08-15T10:56:55.808433Z\",\r\n        \"author\": {\r\n            \"username\": \"ian2\",\r\n            \"bio\": \"\",\r\n            \"image\": \"https://static.productionready.io/images/smiley-cyrus.jpg\"\r\n        },\r\n        \"likes\": [],\r\n        \"dislikes\": [],\r\n        \"likes_count\": 0,\r\n        \"dislikes_count\": 0,\r\n        \"favorited\": false,\r\n        \"favoriteCount\": 0,\r\n        \"tagList\": [\r\n            \"vikings\",\r\n            \"dragon-training\",\r\n            \"dragon\",\r\n            \"dragons\"\r\n        ]\r\n    }\r\n]\r\n\r\n```\r\n\r\nWhat are the relevant pivotal tracker stories?\r\n\r\n[#159054021](https://www.pivotaltracker.com/story/show/159054021) Add Search Functionality with custom filters\r\n\r\n**Screenshots.**\r\n<img width=\"1252\" alt=\"screen shot 2018-08-15 at 18 10 24\" src=\"https://user-images.githubusercontent.com/19705477/44155713-b26d76f0-a0b6-11e8-8e7e-e47457febe85.png\">\r\n\r\n<img width=\"1240\" alt=\"screen shot 2018-08-15 at 19 42 01\" src=\"https://user-images.githubusercontent.com/19705477/44160571-7a8e1980-a0c3-11e8-9021-6ab0a796be3e.png\">\r\n\r\n![image](https://user-images.githubusercontent.com/25982160/44202889-ee790200-a155-11e8-9bf5-3f22c523939f.png)\r\n\r\n![image](https://user-images.githubusercontent.com/25982160/44202781-92ae7900-a155-11e8-9eff-a52ee3969531.png)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/andela/ah-jarvis/issues/comments/413578328","html_url":"https://github.com/andela/ah-jarvis/pull/27#issuecomment-413578328","issue_url":"https://api.github.com/repos/andela/ah-jarvis/issues/27","id":413578328,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzU3ODMyOA==","user":{"login":"dessHub","id":19705477,"node_id":"MDQ6VXNlcjE5NzA1NDc3","avatar_url":"https://avatars0.githubusercontent.com/u/19705477?v=4","gravatar_id":"","url":"https://api.github.com/users/dessHub","html_url":"https://github.com/dessHub","followers_url":"https://api.github.com/users/dessHub/followers","following_url":"https://api.github.com/users/dessHub/following{/other_user}","gists_url":"https://api.github.com/users/dessHub/gists{/gist_id}","starred_url":"https://api.github.com/users/dessHub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dessHub/subscriptions","organizations_url":"https://api.github.com/users/dessHub/orgs","repos_url":"https://api.github.com/users/dessHub/repos","events_url":"https://api.github.com/users/dessHub/events{/privacy}","received_events_url":"https://api.github.com/users/dessHub/received_events","type":"User","site_admin":false},"created_at":"2018-08-16T15:06:22Z","updated_at":"2018-08-16T15:06:22Z","author_association":"COLLABORATOR","body":"@jacksono All merged conflicts have been resolved."}}
{"actor":{"display_login":"dessHub"}}