{"info":{"_postman_id":"1e87a9c4-408a-4a5e-a7d4-2543a6c9cfe9","name":"BuildWeek#4 - The subreddit predictor","description":"<html><head></head><body><p>Post Here helps you find the best place to share on Reddit. The user enters their post and Post Here finds the subreddit that is most appropriate for that post.</p>\n<p>MVP</p>\n<p>WEB:</p>\n<ul>\n<li>As a user I can login and create an account</li>\n<li>As a user I can send a post to the DS API to find out where the best place on reddit is to post</li>\n<li>As a user I can save the response to my profile</li>\n<li>As a user I can search through my saved posts\n-As a user I can delete my saved posts</li>\n</ul>\n<p>DS:</p>\n<ol>\n<li>A model that uses NLP techniques to determine which subreddit has the most similar posts</li>\n</ol>\n<p>STRETCH</p>\n<p>DS</p>\n<ol>\n<li>User inputs user name and they get suggestions for sub-reddit's they might like.</li>\n<li>Expand the model to predict the subreddit where a post would get the most upvotes</li>\n<li>Display summary statistics of targeted subreddit</li>\n</ol>\n<p>Web</p>\n<ul>\n<li>As a user I can utilize the reddit API to automatically post the responses from DS API the corresponding subreddit.</li>\n</ul>\n<p>WEB UI DEVELOPER</p>\n<ul>\n<li>Spencer Elggren</li>\n</ul>\n<p>WEB REACT I</p>\n<ul>\n<li>Sergei Kabuldzhanov</li>\n</ul>\n<p>WEB REACT II</p>\n<ul>\n<li>Mark Halls</li>\n</ul>\n<p>BACKEND DEVELOPER</p>\n<ul>\n<li>Richany Nguon</li>\n<li>Melquisedeque Pereira</li>\n</ul>\n<p>DATA ENGINEER</p>\n<ul>\n<li>Samantha Finley</li>\n<li>Baisal Ergeshev</li>\n</ul>\n<p>MACHINE LEARNING ENGINEERS</p>\n<ul>\n<li>Emmett Boudreau</li>\n<li>Eric Smith</li>\n</ul>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"9227994","collectionId":"1e87a9c4-408a-4a5e-a7d4-2543a6c9cfe9","publishedId":"SW7XZUcT","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2019-11-17T22:07:08.000Z"},"item":[{"name":"Login - Success","id":"6e7a0b2a-5455-4efa-98d3-af9f500b0bb0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"username\": \"admin\",\n\t\"password\": \"admin\"\n}"},"url":"http://localhost:4000/api/auth/login","description":"<p>[POST] /api/auth/login - 200 OK\n{\n    \"username\": \"admin\",\n    \"password\": \"admin\"\n}</p>\n<p>Response returns object with <code>id</code>, <code>token</code>, <code>redditAuth</code> and <code>redditState</code> keys.\nThe <code>redditAuth</code> is a boolean that determines if the user is logged in with reddit or not. If not, front-end needs to request the api/reddit/auth and refresh the token. The <code>redditState</code> is the token required to be in the request body when requesting the reddit access token in /api/reddit/auth -&gt; <code>state</code>.</p>\n","urlObject":{"protocol":"http","port":"4000","path":["api","auth","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"6e7a0b2a-5455-4efa-98d3-af9f500b0bb0"},{"name":"Login - Failure - Missing fields","id":"fd431ba1-70e6-478c-b650-7341f6bc8e0d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"username\": \"admin\"\n}"},"url":"http://localhost:4000/api/auth/login","description":"<p>[POST] /api/auth/login - 401 Bad Request\n{\n    \"username\": \"admin\"\n}</p>\n<p>Response returns error object with all the information about the error. The most important key is the <code>message</code>.</p>\n","urlObject":{"protocol":"http","port":"4000","path":["api","auth","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"fd431ba1-70e6-478c-b650-7341f6bc8e0d"},{"name":"Login - Failure - Wrong credentials","id":"89e9cffe-30b4-46cc-a428-a0e4568283d6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"username\": \"admin\",\n\t\"password\": \"admin1\"\n}"},"url":"http://localhost:4000/api/auth/login","description":"<p>[POST] /api/auth/login - 403 Forbidden\n{\n    \"username\": \"admin\",\n    \"password\": \"admin1\"\n}</p>\n<p>Response returns error object with all the information about the error. The most important key is the <code>message</code>.</p>\n","urlObject":{"protocol":"http","port":"4000","path":["api","auth","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"89e9cffe-30b4-46cc-a428-a0e4568283d6"},{"name":"Login - Failure - Unexisting user","id":"239ce5b5-d904-4c37-aa2c-a6b42f16edbf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"username\": \"admin\"\n}"},"url":"http://localhost:4000/api/auth/login","description":"<p>[POST] /api/auth/login - 404\n{\n    \"username\": \"admin1\",\n    \"password\": \"admin\"\n}</p>\n<p>Response returns error object with all the information about the error. The most important key is the <code>message</code>.</p>\n","urlObject":{"protocol":"http","port":"4000","path":["api","auth","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"239ce5b5-d904-4c37-aa2c-a6b42f16edbf"},{"name":"Register - Success","id":"fa279b44-462a-4ba3-bc78-6c08c8007f82","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"username\": \"test\",\n\t\"password\": \"test\"\n}"},"url":"http://localhost:4000/api/auth/register","description":"<p>[POST] /api/auth/register - 201 OK\n{\n    \"username\": \"test\",\n    \"password\": \"test\"\n}</p>\n<p>Response returns new user object with <code>id</code> and <code>username</code> keys.</p>\n","urlObject":{"protocol":"http","port":"4000","path":["api","auth","register"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"fa279b44-462a-4ba3-bc78-6c08c8007f82"},{"name":"Register - Failure - Missing fields","id":"8ef585de-4b1c-4b3d-b5ac-4570563bcf0d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"username\": \"test\"\n}"},"url":"http://localhost:4000/api/auth/register","description":"<p>[POST] /api/auth/register - 401 Bad Request\n{\n    \"username\": \"test\"\n}</p>\n<p>Response returns error object with all the information about the error. The most important key is the <code>message</code>.</p>\n","urlObject":{"protocol":"http","port":"4000","path":["api","auth","register"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"8ef585de-4b1c-4b3d-b5ac-4570563bcf0d"},{"name":"Reddit - Login URL - Success","id":"6a9de33f-e2d9-4e7f-8bf0-6340834fc73d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"},{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWJqZWN0IjoxLCJ1c2VybmFtZSI6ImFkbWluIiwiaWF0IjoxNTc0MDk1Mzc3LCJleHAiOjE1NzQxMjQxNzd9.7nAI3KjCdL7Zq0cwE6UhSQIoJohDPvzLo8uhBif3cIY","type":"text"}],"url":"http://localhost:4000/api/reddit","description":"<p>[GET] /api/reddit - 200 OK</p>\n<p>Needs Authorization header with the logged in user token</p>\n<p>Optional query param: mobile (boolean: 0 or 1)</p>\n<p>Response is an object with <code>url</code> key holding the url the user should be redirected to.</p>\n","urlObject":{"protocol":"http","port":"4000","path":["api","reddit"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"6a9de33f-e2d9-4e7f-8bf0-6340834fc73d"},{"name":"Reddit - User Authentication - Success","id":"81aa3b2a-c2b7-4039-b02b-a348292df628","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"},{"key":"Authorization","type":"text","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWJqZWN0IjoxLCJ1c2VybmFtZSI6ImFkbWluIiwiaWF0IjoxNTc0MjQyNDY4LCJleHAiOjE1NzQyNzEyNjh9.nn-OEp5g-MpoxFrQEoSm1xoef4utfJx1jpadyzuBukU"}],"body":{"mode":"raw","raw":"{\n\t\"state\": \"eyJpZCI6MX0%3D\",\n\t\"code\": \"tNtiVnacIrU7kYsM2BewsbjjBKs\"\n}"},"url":"http://localhost:4000/api/reddit/auth","description":"<p>[GET] /api/reddit/auth - 200 OK</p>\n<p>Needs Authorization header with the logged in user token</p>\n<p>Required parameters after user allows/rejects access to reddit:\nstate=HASHED_STATE;\ncode=REDDIT_CODE;</p>\n<p>Response is an object with <code>authorized</code> key with boolean value.\nThis endpoint is used to get a reddit <code>access_token</code> or refresh the token. </p>\n","urlObject":{"protocol":"http","port":"4000","path":["api","reddit","auth"],"host":["localhost"],"query":[{"disabled":true,"key":"state","value":"%242a%2411%2489f4nYV75NLBZy8seuLfR.esIikHh1CnGznMtam739cBfyynlm7ky"},{"disabled":true,"key":"code","value":"4214"}],"variable":[]}},"response":[],"_postman_id":"81aa3b2a-c2b7-4039-b02b-a348292df628"},{"name":"Posts - List - Success","id":"145eb657-81e7-490f-9dba-51477a08342f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"},{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWJqZWN0IjoxLCJ1c2VybmFtZSI6ImFkbWluIiwiaWF0IjoxNTc0MDk1Mzc3LCJleHAiOjE1NzQxMjQxNzd9.7nAI3KjCdL7Zq0cwE6UhSQIoJohDPvzLo8uhBif3cIY","type":"text"}],"url":"http://localhost:4000/api/posts","description":"<p>[GET] /api/posts - 200 OK</p>\n<p>Needs Authorization header with the logged in user token</p>\n<p>Response is an array with post objects of the currently logged in user.</p>\n","urlObject":{"protocol":"http","port":"4000","path":["api","posts"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"145eb657-81e7-490f-9dba-51477a08342f"},{"name":"Posts - Single - Success","id":"e808ece9-24c0-4f34-899a-e6ed2eedc662","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"},{"key":"Authorization","type":"text","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWJqZWN0IjoxLCJ1c2VybmFtZSI6ImFkbWluIiwiaWF0IjoxNTc0MjU2NDA2LCJleHAiOjE1NzQyODUyMDZ9.qqt5Radv6_F2vsjYRH3GP8YQYRkXmLT7C7eAv9Oqt1I"}],"url":"http://localhost:4000/api/posts/3","description":"<p>[GET] /api/posts/:id - 200 OK</p>\n<p>Needs Authorization header with the logged in user token</p>\n<p>:id needs to be a positive integer id of existent post</p>\n<p>Response is a single post object of the currently logged in user.</p>\n","urlObject":{"protocol":"http","port":"4000","path":["api","posts","3"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"e808ece9-24c0-4f34-899a-e6ed2eedc662"},{"name":"Posts - Create - Success","id":"ebf8520d-a0e7-49f4-85d1-4ef8620588e3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"},{"key":"Authorization","type":"text","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWJqZWN0IjoxLCJ1c2VybmFtZSI6ImFkbWluIiwiaWF0IjoxNTc0MzMwODY5LCJleHAiOjE1NzQzNTk2Njl9.mCWlnmbeH9uSHKb1fd3rwmA93WPvFpExaAjcaHdtk90"}],"body":{"mode":"raw","raw":"{\n\t\"title\": \"A title here\",\n\t\"text\": \"A text here\"\n}"},"url":"http://localhost:4000/api/posts/","description":"<p>[POST] /api/posts - 201 Created</p>\n<p>Needs Authorization header with the logged in user token</p>\n<p>Response returns the post data and a <code>suggestions</code> array with the suggested subreddits for the post.</p>\n","urlObject":{"protocol":"http","port":"4000","path":["api","posts",""],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"ebf8520d-a0e7-49f4-85d1-4ef8620588e3"},{"name":"Posts - Reddit - Create - Success","id":"e0fbea51-f778-45cd-a7c8-adc8237dd777","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"},{"key":"Authorization","type":"text","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWJqZWN0IjoxLCJ1c2VybmFtZSI6ImFkbWluIiwiaWF0IjoxNTc0MDk1Mzc3LCJleHAiOjE1NzQxMjQxNzd9.7nAI3KjCdL7Zq0cwE6UhSQIoJohDPvzLo8uhBif3cIY"}],"body":{"mode":"raw","raw":"{\n\t\"title\": \"A title here\",\n\t\"text\": \"A text here\",\n\t\"state\": \"STATE_HERE\",\n\t\"subreddit\": \"redditdev\"\n}"},"url":"http://localhost:4000/api/posts/reddit","description":"<p>[POST] /api/posts/reddit - 200 OK</p>\n<p>Needs Authorization header with the logged in user token</p>\n<p>Creates a post in the chosen subreddit - REAL REDDIT.</p>\n<p>Requires <code>title</code>, <code>text</code>, <code>subreddit</code> and <code>state</code>.</p>\n","urlObject":{"protocol":"http","port":"4000","path":["api","posts","reddit"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"e0fbea51-f778-45cd-a7c8-adc8237dd777"},{"name":"Posts - Edit - Success","id":"805f37ba-7c19-4ffb-8339-f3840c12dcf2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"},{"key":"Authorization","type":"text","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWJqZWN0IjoxLCJ1c2VybmFtZSI6ImFkbWluIiwiaWF0IjoxNTc0MDk1Mzc3LCJleHAiOjE1NzQxMjQxNzd9.7nAI3KjCdL7Zq0cwE6UhSQIoJohDPvzLo8uhBif3cIY"}],"body":{"mode":"raw","raw":"{\n\t\"title\": \"Some new title here\"\n}"},"url":"http://localhost:4000/api/posts/1","description":"<p>[PUT] /api/posts/:id - 200 OK</p>\n<p>Needs Authorization header with the logged in user token</p>\n<p>:id needs to be a positive integer id of existent post</p>\n","urlObject":{"protocol":"http","port":"4000","path":["api","posts","1"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"805f37ba-7c19-4ffb-8339-f3840c12dcf2"},{"name":"Posts - Remove - Success","id":"463945ea-6396-4f96-a757-78e9524a5f17","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"},{"key":"Authorization","type":"text","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWJqZWN0IjoxLCJ1c2VybmFtZSI6ImFkbWluIiwiaWF0IjoxNTc0MDk1Mzc3LCJleHAiOjE1NzQxMjQxNzd9.7nAI3KjCdL7Zq0cwE6UhSQIoJohDPvzLo8uhBif3cIY"}],"url":"http://localhost:4000/api/posts/1","description":"<p>[DELETE] /api/posts/:id - 200 OK</p>\n<p>Needs Authorization header with the logged in user token</p>\n<p>:id needs to be a positive integer id of existent post</p>\n","urlObject":{"protocol":"http","port":"4000","path":["api","posts","1"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"463945ea-6396-4f96-a757-78e9524a5f17"}],"event":[{"listen":"prerequest","script":{"id":"02f6992a-adc5-4bcc-bc45-83183add5cdc","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"e94f425e-adf8-4a5f-a805-578299e80458","type":"text/javascript","exec":[""]}}]}