{"info":{"_postman_id":"78149020-40a3-4657-80a9-7683bdae2c78","name":"Twitter Clone","description":"<html><head></head><body><p>This collection is created to help understand the Rest API creation on Node.js with Express and MySQL</p>\n<p>The original article can be found here: <a href=\"https://time2hack.com/2019/09/creating-rest-api-in-node-js-with-express-and-mysql/\">https://time2hack.com/2019/09/creating-rest-api-in-node-js-with-express-and-mysql/</a></p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"253338","collectionId":"78149020-40a3-4657-80a9-7683bdae2c78","publishedId":"SVn3tvgw","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2019-09-28T20:27:32.000Z"},"item":[{"name":"Tweets","item":[{"name":"Feed","id":"fcf46c67-d3e3-4fe7-9285-21290650ee3f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:3000/tweets/feed","description":"<p>User's Feed</p>\n","urlObject":{"path":["tweets","feed"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[],"_postman_id":"fcf46c67-d3e3-4fe7-9285-21290650ee3f"},{"name":"Tweet from Feed","id":"460b32bd-e560-4cfe-9b56-b6507711a94a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:3000/tweets/10","description":"<p>Tweet from User's Feed</p>\n","urlObject":{"path":["tweets","10"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[],"_postman_id":"460b32bd-e560-4cfe-9b56-b6507711a94a"}],"id":"e9459f0b-b1c4-400a-a405-6e6b501e1d24","_postman_id":"e9459f0b-b1c4-400a-a405-6e6b501e1d24","description":""},{"name":"User","item":[{"name":"Logged in User Profile","id":"b4d8c105-7251-4f42-afce-0ce5f9e434ab","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:3000/user","urlObject":{"path":["user"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[],"_postman_id":"b4d8c105-7251-4f42-afce-0ce5f9e434ab"},{"name":"Get User's Followers","id":"806116cb-fb76-46a5-abd0-0deb94246430","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:3000/user/followers","urlObject":{"path":["user","followers"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[],"_postman_id":"806116cb-fb76-46a5-abd0-0deb94246430"},{"name":"Get Whom User is Following","id":"a7198c29-fb27-47dc-812d-0b6c2711efdc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:3000/user/following","urlObject":{"path":["user","following"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[],"_postman_id":"a7198c29-fb27-47dc-812d-0b6c2711efdc"},{"name":"User Follow new Friend","id":"1fd60098-6684-467b-bfa6-56a5142a1e43","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"id","value":"5","type":"text"}]},"url":"http://localhost:3000/user/following","urlObject":{"path":["user","following"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[],"_postman_id":"1fd60098-6684-467b-bfa6-56a5142a1e43"},{"name":"Get Settings","id":"ce4774c2-8ac9-43c6-9f2b-7502ea5aa66b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:3000/user/settings","urlObject":{"path":["user","settings"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[],"_postman_id":"ce4774c2-8ac9-43c6-9f2b-7502ea5aa66b"},{"name":"Update Settings","id":"ae555c88-c416-4a0a-b256-f2f44d6d91b4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"formdata","formdata":[{"key":"email","value":"true","type":"text"},{"key":"sms","value":"false","type":"text"}]},"url":"http://localhost:3000/user/settings","urlObject":{"path":["user","settings"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[],"_postman_id":"ae555c88-c416-4a0a-b256-f2f44d6d91b4"}],"id":"4018ed74-2575-4e6f-98f8-d1e074fa56aa","_postman_id":"4018ed74-2575-4e6f-98f8-d1e074fa56aa","description":""},{"name":"Register","event":[{"listen":"test","script":{"id":"ed766847-6bde-48fa-9675-d2b1631814dc","exec":["","pm.test(\"Resposne has ID\", function () {","    var jsonData = pm.response.json();","    pm.expect(jsonData.id).to.not.eql(null);","});","pm.environment.set(\"user\", pm.response.json().id);",""],"type":"text/javascript"}}],"id":"3fc5f773-084a-482a-94ff-c5634207a0f0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"username","value":"r_Marcellus_Johnson23","type":"text"},{"key":"password","value":"random-password","type":"text"}]},"url":"http://localhost:3000/auth/register","description":"<h1 id=\"register-new-user\">Register New User</h1>\n<hr />\n<h2 id=\"params\">Params</h2>\n<p><code>username</code>: <code>String</code>\n<code>password</code>: <code>String</code></p>\n<p>Returns the new User's ID and Set's to Environment</p>\n","urlObject":{"path":["auth","register"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[],"_postman_id":"3fc5f773-084a-482a-94ff-c5634207a0f0"},{"name":"Login","event":[{"listen":"test","script":{"id":"6297fe46-d7b5-49f6-982f-5b0e0f467cc3","exec":["","pm.test(\"Resposne has ID\", function () {","    var jsonData = pm.response.json();","    pm.expect(jsonData.id).to.not.eql(null);","});","pm.environment.set(\"user\", pm.response.json().id);",""],"type":"text/javascript"}}],"id":"83ca63a4-c679-43d4-976f-b0fed32fdf4a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"username","value":"pankaj","type":"text"},{"key":"password","value":"pankaj","type":"text"}]},"url":"http://localhost:3000/auth/login","description":"<h1 id=\"login\">Login</h1>\n<hr />\n<h2 id=\"params\">Params</h2>\n<p><code>username</code>: <code>String</code>\n<code>password</code>: <code>String</code></p>\n<p>Returns the User's ID and Set's to Environment</p>\n","urlObject":{"path":["auth","login"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[],"_postman_id":"83ca63a4-c679-43d4-976f-b0fed32fdf4a"}],"event":[{"listen":"prerequest","script":{"id":"9f38fe7c-852d-47ea-94c0-a30a02fe80f1","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"fbd831b3-89ea-4af7-9e1c-b34bd57dba5e","type":"text/javascript","exec":[""]}}],"variable":[{"key":"url","value":"http://localhost:3000"},{"key":"user","value":"1"},{"key":"randomPassword","value":"random-password"}]}