{"info":{"_postman_id":"c8b0b6fb-cdf7-4999-a0a6-5254d7ebcb9a","name":"PlayTubeByYashpz","description":"<html><head></head><body><p>This is a <code>YOUTUBE + TWITTER</code> backend project that covers allmost the functionalities of youtube and also combines the tweet functionality from twitter into it. Find more about his project in the documentation below.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"32807699","collectionId":"c8b0b6fb-cdf7-4999-a0a6-5254d7ebcb9a","publishedId":"2sA3XPChSM","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-06-13T05:06:07.000Z"},"item":[{"name":"Users","item":[{"name":"Register","id":"cfdf1293-33ba-407b-aa49-c190db85831e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"username","value":"harry","type":"text"},{"key":"email","value":"harry@pizza.com","type":"text"},{"key":"password","value":"12345678","type":"text"},{"key":"fullName","value":"Hariom Mehta","type":"text"},{"key":"avatar","type":"file","fileNotInWorkingDirectoryWarning":"This file isn't in your working directory. Teammates you share this request with won't be able to use this file. To make collaboration easier you can setup your working directory in Settings.","filesNotInWorkingDirectory":["/D:/Photos/avatars/windowslogo.jpg"],"src":"/D:/Photos/avatars/windowslogo.jpg"},{"key":"coverImage","type":"file","src":"/D:/Photos/avatars/BioNTech-Pharma.png"}]},"url":"{{VideotubeServer}}/users/register","urlObject":{"path":["users","register"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"cfdf1293-33ba-407b-aa49-c190db85831e"},{"name":"Login","event":[{"listen":"test","script":{"exec":["pm.test(\"Response status code is 200\", function () {","  pm.expect(pm.response.code).to.equal(200);","});","","","pm.test(\"Content-Type header is application/json\", function () {","    pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");","});","","","pm.test(\"User object exists in the response\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData).to.be.an('object');","    pm.expect(responseData.data.user).to.exist.and.to.be.an('object');","});","","","pm.test(\"AccessToken and refreshToken are not empty\", function () {","  const responseData = pm.response.json();","","  pm.expect(responseData.accessToken).to.exist.and.to.not.be.empty;","  pm.expect(responseData.refreshToken).to.exist.and.to.not.be.empty;","});","","","pm.test(\"Verify createdAt and updatedAt fields are in a valid date format\", function () {","  const responseData = pm.response.json();","","  pm.expect(responseData.createdAt).to.match(/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$/, \"createdAt should be in valid date format\");","  pm.expect(responseData.updatedAt).to.match(/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$/, \"updatedAt should be in valid date format\");","});"],"type":"text/javascript"}}],"id":"428e312f-0d4c-4118-b5ed-02eadd61a501","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"urlencoded","urlencoded":[{"key":"username","value":"chaiaurcode","type":"text"},{"key":"password","value":"12345678","type":"text"}]},"url":"{{VideotubeServer}}/users/login","urlObject":{"path":["users","login"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"428e312f-0d4c-4118-b5ed-02eadd61a501"},{"name":"Logout","event":[{"listen":"test","script":{"exec":["pm.test(\"Response status code is 200\", function () {","  pm.response.to.have.status(200);","});","","","pm.test(\"Response has the required fields\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData).to.be.an('object');","    pm.expect(responseData).to.have.property('statusCode');","    pm.expect(responseData).to.have.property('data');","    pm.expect(responseData).to.have.property('message');","    pm.expect(responseData).to.have.property('success');","});","","","pm.test(\"Data is an empty object\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData.data).to.be.an('object').that.is.empty;","});","","","pm.test(\"Message is an empty string\", function () {","  const responseData = pm.response.json();","  ","  pm.expect(responseData.message).to.equal(\"\");","});","","","pm.test(\"Success is a boolean value\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData.success).to.be.a('boolean');","});"],"type":"text/javascript"}}],"id":"15049d04-b99b-4bc3-a648-b6d407038d6e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"{{VideotubeServer}}/users/logout","urlObject":{"path":["users","logout"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"15049d04-b99b-4bc3-a648-b6d407038d6e"},{"name":"Refresh access token","id":"eb0b7a26-8bff-4094-a39f-899f1874f67a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"{{VideotubeServer}}/users/refresh-token","urlObject":{"path":["users","refresh-token"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"eb0b7a26-8bff-4094-a39f-899f1874f67a"},{"name":"Change password","id":"1af8367a-7f07-4750-8f12-6c1cd9fd6142","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"oldPassword\":\"12345678\",\r\n    \"newPassword\":\"chaiaurcode\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{VideotubeServer}}/users/change-password","urlObject":{"path":["users","change-password"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"1af8367a-7f07-4750-8f12-6c1cd9fd6142"},{"name":"Update Profile","id":"4c38aee6-a105-47d3-8405-bb3027f7c546","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"formdata","formdata":[{"key":"username","value":"domino","type":"text","disabled":true},{"key":"email","value":"yash@yash.com","type":"text","disabled":true},{"key":"fullName","value":"Rocking*Yash","type":"text","disabled":true}]},"url":"{{VideotubeServer}}/users/update-profile","urlObject":{"path":["users","update-profile"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"4c38aee6-a105-47d3-8405-bb3027f7c546"},{"name":"Get Current User","id":"6a8e2f52-e2a8-4f2b-8549-5078a1720432","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{VideotubeServer}}/users/get-current-user","urlObject":{"path":["users","get-current-user"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"6a8e2f52-e2a8-4f2b-8549-5078a1720432"},{"name":"Avatar","id":"e2b20e69-ab20-4122-b470-bd5247442bdd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"formdata","formdata":[{"key":"avatar","type":"file","src":"/D:/Photos/avatars/pizzaslice.jpg"}]},"url":"{{VideotubeServer}}/users/avatar","urlObject":{"path":["users","avatar"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"e2b20e69-ab20-4122-b470-bd5247442bdd"},{"name":"Cover image","id":"2058a220-f287-4d80-aee0-32fe04e90a86","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"formdata","formdata":[{"key":"coverImage","type":"file","src":"/D:/Photos/Creation/cvrimg.png"}]},"url":"{{VideotubeServer}}/users/cover-image","urlObject":{"path":["users","cover-image"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"2058a220-f287-4d80-aee0-32fe04e90a86"},{"name":"channel profile","event":[{"listen":"test","script":{"exec":["pm.test(\"Response status code is 200\", function () {","  pm.expect(pm.response.code).to.equal(200);","});","","","pm.test(\"Response has the required fields\", function () {","  const responseData = pm.response.json();","  ","  pm.expect(responseData).to.be.an('object');","  pm.expect(responseData._id).to.exist;","  pm.expect(responseData.username).to.exist;","  pm.expect(responseData.email).to.exist;","  pm.expect(responseData.fullName).to.exist;","  pm.expect(responseData.avatar).to.exist;","  pm.expect(responseData.coverImage).to.exist;","  pm.expect(responseData.subscribersCount).to.exist;","  pm.expect(responseData.channelsSubscribedToCount).to.exist;","  pm.expect(responseData.isSubscribed).to.exist;","});","","","pm.test(\"Email is in a valid format\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData.data.email).to.be.a('string').and.to.match(/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$/);","});","","","pm.test(\"Data object is present in the response\", function () {","  const responseData = pm.response.json();","  ","  pm.expect(responseData).to.have.property('data');","});","","","pm.test(\"StatusCode should be equal to 0\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData.statusCode).to.equal(0);","});"],"type":"text/javascript"}}],"id":"8df2da48-d3c8-4114-8aae-da55e11246c9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{VideotubeServer}}/users/c/harry","urlObject":{"path":["users","c","harry"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"8df2da48-d3c8-4114-8aae-da55e11246c9"},{"name":"watch history","id":"a456e19d-3cca-4cfc-a5bb-a5137912cfc6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"formdata","formdata":[{"key":"username","value":"domino","type":"text"},{"key":"email","value":"daas@das.com","type":"text"},{"key":"password","value":"12345678","type":"text"},{"key":"fullName","value":"Bahubali","type":"text"},{"key":"avatar","type":"file","fileNotInWorkingDirectoryWarning":"This file isn't in your working directory. Teammates you share this request with won't be able to use this file. To make collaboration easier you can setup your working directory in Settings.","filesNotInWorkingDirectory":["/C:/Users/zanza/OneDrive/Pictures/Screenshots/Screenshot 2024-03-29 182932.png"],"src":"/C:/Users/zanza/OneDrive/Pictures/Screenshots/Screenshot 2024-03-29 182932.png"},{"key":"coverImage","type":"file","fileNotInWorkingDirectoryWarning":"This file isn't in your working directory. Teammates you share this request with won't be able to use this file. To make collaboration easier you can setup your working directory in Settings.","filesNotInWorkingDirectory":["/C:/Users/zanza/OneDrive/Pictures/Screenshots/Screenshot 2024-03-27 173646.png"],"src":"/C:/Users/zanza/OneDrive/Pictures/Screenshots/Screenshot 2024-03-27 173646.png"}]},"url":"{{VideotubeServer}}/users/history","urlObject":{"path":["users","history"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"a456e19d-3cca-4cfc-a5bb-a5137912cfc6"}],"id":"5924a289-3776-4ccc-8593-841e4b89c6c3","description":"<p>Route Tests for User Controllers</p>\n","_postman_id":"5924a289-3776-4ccc-8593-841e4b89c6c3"},{"name":"Videos","item":[{"name":"Publish Video","id":"754df1b4-9864-44f7-a7b8-d2e29e19bb1c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"videoFile","type":"file","fileNotInWorkingDirectoryWarning":"This file isn't in your working directory. Teammates you share this request with won't be able to use this file. To make collaboration easier you can setup your working directory in Settings.","filesNotInWorkingDirectory":["/C:/Users/zanza/Downloads/videos/street.mp4"],"src":"/C:/Users/zanza/Downloads/videos/street.mp4"},{"key":"thumbnail","type":"file","fileNotInWorkingDirectoryWarning":"This file isn't in your working directory. Teammates you share this request with won't be able to use this file. To make collaboration easier you can setup your working directory in Settings.","filesNotInWorkingDirectory":["/C:/Users/zanza/OneDrive/Pictures/Screenshots/Screenshot 2024-06-02 102843.png"],"src":"/C:/Users/zanza/OneDrive/Pictures/Screenshots/Screenshot 2024-06-02 102843.png"},{"key":"title","value":"House of Ghost","type":"text"},{"key":"description","value":"Et vitae earum praesentium blanditiis. Reprehenderit doloremque suscipit nisi accusamus. Sunt id sed placeat rem. Eius porro ipsum sed nihil consequuntur quos qui non impedit. Ratione ut veritatis aut reprehenderit rerum beatae. Accusamus sed fuga ab eos possimus.\n \rMagnam sint quod. Veritatis aut cupiditate sunt ullam tempore deleniti voluptas hic. Dolores quis quo omnis aut eum in eos ea.\n \rId in et suscipit et soluta autem odio esse atque. Neque est tempore vitae expedita saepe sint enim eum. Earum necessitatibus officiis ab eligendi. Praesentium adipisci omnis autem enim ut. Sed doloremque sit commodi ut.","type":"text"}]},"url":"{{VideotubeServer}}/videos","urlObject":{"path":["videos"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"754df1b4-9864-44f7-a7b8-d2e29e19bb1c"},{"name":"Publish Video 2","id":"ca8a6968-f5fa-458d-8d59-5bd39ad7959a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"videoFile","type":"file","fileNotInWorkingDirectoryWarning":"This file isn't in your working directory. Teammates you share this request with won't be able to use this file. To make collaboration easier you can setup your working directory in Settings.","filesNotInWorkingDirectory":["/C:/Users/zanza/Downloads/videos/car_boy.mp4"],"value":null},{"key":"thumbnail","type":"file","fileNotInWorkingDirectoryWarning":"This file isn't in your working directory. Teammates you share this request with won't be able to use this file. To make collaboration easier you can setup your working directory in Settings.","filesNotInWorkingDirectory":["/C:/Users/zanza/OneDrive/Pictures/Screenshots/cars.png"],"src":"/C:/Users/zanza/OneDrive/Pictures/Screenshots/cars.png"},{"key":"title","value":"A Boy Playing with cars","type":"text"},{"key":"description","value":"Et libero expedita perferendis omnis nisi delectus cum voluptates esse. Quo ratione qui nobis cumque consectetur eum alias. Quia eius quia velit ut temporibus dignissimos. Aspernatur sapiente adipisci voluptatibus officiis voluptate sed vitae. Et officiis quia est eum ipsum unde pariatur est quia.","type":"text"}]},"url":"{{VideotubeServer}}/videos","urlObject":{"path":["videos"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"ca8a6968-f5fa-458d-8d59-5bd39ad7959a"},{"name":"Get Video by ID","event":[{"listen":"test","script":{"exec":["pm.test(\"Response status code is 200\", function () {","    pm.expect(pm.response.code).to.equal(200);","});","","","pm.test(\"Content-Type header is application/json\", function () {","    pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");","});","","","pm.test(\"Validate the data object\", function () {","    const responseData = pm.response.json();","","    pm.expect(responseData).to.be.an('object');","    pm.expect(responseData.data).to.exist.and.to.be.an('object');","    pm.expect(responseData.data._id).to.exist.and.to.be.a('string');","    pm.expect(responseData.data.videoFile).to.exist.and.to.be.a('string');","    pm.expect(responseData.data.title).to.exist.and.to.be.a('string');","    pm.expect(responseData.data.description).to.exist.and.to.be.a('string');","    pm.expect(responseData.data.duration).to.exist.and.to.be.a('number');","    pm.expect(responseData.data.thumbnail).to.exist.and.to.be.a('string');","    pm.expect(responseData.data.views).to.exist.and.to.be.a('number');","    pm.expect(responseData.data.owner).to.exist.and.to.be.an('object');","    pm.expect(responseData.data.owner._id).to.exist.and.to.be.a('string');","    pm.expect(responseData.data.owner.username).to.exist.and.to.be.a('string');","    pm.expect(responseData.data.owner.fullName).to.exist.and.to.be.a('string');","    pm.expect(responseData.data.owner.avatar).to.exist.and.to.be.a('string');","    pm.expect(responseData.data.createdAt).to.exist.and.to.be.a('string');","    pm.expect(responseData.data.updatedAt).to.exist.and.to.be.a('string');","    pm.expect(responseData.data.totalLikes).to.exist.and.to.be.a('number');","    pm.expect(responseData.data.totalDisLikes).to.exist.and.to.be.a('number');","    pm.expect(responseData.data.isLiked).to.exist.and.to.be.a('boolean');","    pm.expect(responseData.data.isDisLiked).to.exist.and.to.be.a('boolean');","});","","","pm.test(\"Owner object contains expected fields\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData.owner).to.be.an('object');","    pm.expect(responseData.owner._id).to.exist;","    pm.expect(responseData.owner.username).to.exist;","    pm.expect(responseData.owner.fullName).to.exist;","    pm.expect(responseData.owner.avatar).to.exist;","});","","","pm.test(\"TotalLikes and TotalDisLikes are non-negative integers\", function () {","    const responseData = pm.response.json();","","    pm.expect(responseData.totalLikes).to.be.a('number').and.to.be.at.least(0);","    pm.expect(responseData.totalDisLikes).to.be.a('number').and.to.be.at.least(0);","});"],"type":"text/javascript"}}],"id":"d1c2ff1b-6e77-48c7-a144-bc3964031781","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{VideotubeServer}}/videos/6661710288a680ce636e2692","description":"<p>Working</p>\n","urlObject":{"path":["videos","6661710288a680ce636e2692"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"d1c2ff1b-6e77-48c7-a144-bc3964031781"},{"name":"Get All Videos","event":[{"listen":"test","script":{"exec":["pm.test(\"Response status code is 200\", function () {","  pm.expect(pm.response.code).to.equal(200);","});","","","pm.test(\"Response has the required fields\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData).to.be.an('object');","    pm.expect(responseData._id).to.exist;","    pm.expect(responseData.videoFile).to.exist;","    pm.expect(responseData.title).to.exist;","    pm.expect(responseData.description).to.exist;","    pm.expect(responseData.duration).to.exist;","    pm.expect(responseData.thumbnail).to.exist;","    pm.expect(responseData.views).to.exist;","    pm.expect(responseData.isPublished).to.exist;","    pm.expect(responseData.owner).to.exist;","    pm.expect(responseData.createdAt).to.exist;","    pm.expect(responseData.updatedAt).to.exist;","    pm.expect(responseData.__v).to.exist;","});","","","pm.test(\"Owner object contains _id, username, fullName, avatar\", function () {","  const responseData = pm.response.json();","  ","  pm.expect(responseData).to.be.an('object');","  pm.expect(responseData.data).to.be.an('array');","  ","  responseData.data.forEach(function(video) {","    pm.expect(video.owner).to.be.an('object');","    pm.expect(video.owner._id).to.exist;","    pm.expect(video.owner.username).to.exist;","    pm.expect(video.owner.fullName).to.exist;","    pm.expect(video.owner.avatar).to.exist;","  });","});","","","pm.test(\"Duration is a non-negative integer\", function () {","    const responseData = pm.response.json();","    ","    responseData.data.forEach(function(video) {","        pm.expect(video.duration).to.be.a('number');","        pm.expect(video.duration).to.be.at.least(0, \"Duration should be a non-negative integer\");","    });","});","","","pm.test(\"Data array is present and contains expected number of elements\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData).to.be.an('object');","    pm.expect(responseData.data).to.be.an('array');","    pm.expect(responseData.data.length).to.equal(1);","});"],"type":"text/javascript"}}],"id":"663cc6ec-b8dd-40ee-afd0-528f31474383","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"formdata","formdata":[]},"url":"{{VideotubeServer}}/videos?userId=660700de7f10c596bcd506a7","urlObject":{"path":["videos"],"host":["{{VideotubeServer}}"],"query":[{"key":"userId","value":"660700de7f10c596bcd506a7"}],"variable":[]}},"response":[],"_postman_id":"663cc6ec-b8dd-40ee-afd0-528f31474383"},{"name":"Get All Videos By Option","event":[{"listen":"test","script":{"exec":["pm.test(\"Response status code is 200\", function () {","    pm.expect(pm.response.code).to.equal(200);","});","","","pm.test(\"Content-Type header is application/json\", function () {","    pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");","});","","","pm.test(\"Data object structure is valid\", function () {","    const responseData = pm.response.json();","","    pm.expect(responseData.data).to.be.an('object');","    pm.expect(responseData.data.videos).to.be.an('array');","    pm.expect(responseData.data.pagingInfo).to.be.an('object');","});","","","pm.test(\"Videos array is present and contains at least one element\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData).to.have.property('data');","    pm.expect(responseData.data).to.have.property('videos').that.is.an('array').and.not.to.be.empty;","});","","","pm.test(\"Owner object within the videos array should have specific properties\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData.data.videos).to.be.an('array').that.is.not.empty;","    ","    responseData.data.videos.forEach(function(video) {","        pm.expect(video.owner).to.be.an('object');","        pm.expect(video.owner._id).to.be.a('string');","        pm.expect(video.owner.username).to.be.a('string');","        pm.expect(video.owner.fullName).to.be.a('string');","        pm.expect(video.owner.avatar).to.be.a('string');","    });","});"],"type":"text/javascript"}}],"id":"53ac00ba-5df8-4330-841d-eef07be84eb6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"formdata","formdata":[]},"url":"{{VideotubeServer}}/videos/all/option?page=3&limit=3","urlObject":{"path":["videos","all","option"],"host":["{{VideotubeServer}}"],"query":[{"key":"page","value":"3"},{"disabled":true,"key":"userId","value":"660700de7f10c596bcd506a7"},{"disabled":true,"key":"search","value":"How  ghost  Web  makes House Spyder their"},{"disabled":true,"key":"sortBy","value":"createdAt"},{"disabled":true,"key":"sortType","value":"video"},{"disabled":true,"key":"order","value":"-1"},{"key":"limit","value":"3"}],"variable":[]}},"response":[],"_postman_id":"53ac00ba-5df8-4330-841d-eef07be84eb6"},{"name":"Delete Video","id":"d24d804b-e442-4085-bb05-592972cd962e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"{{VideotubeServer}}/videos/661d90ad98759d6b9cc3f9d9","urlObject":{"path":["videos","661d90ad98759d6b9cc3f9d9"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"d24d804b-e442-4085-bb05-592972cd962e"},{"name":"Update Video","id":"999db04a-aedd-4523-8161-c8ebf46bb57e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"formdata","formdata":[{"key":"thumbnail","type":"file","src":"/C:/Users/zanza/Downloads/Dummy/tv.jpg"},{"key":"title","value":"How Honey bees make their House","type":"text","disabled":true},{"key":"description","value":"this is updated 2","type":"text","disabled":true}]},"url":"{{VideotubeServer}}/videos/661faabcb56b7247ead8526a","urlObject":{"path":["videos","661faabcb56b7247ead8526a"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"999db04a-aedd-4523-8161-c8ebf46bb57e"},{"name":"Toggle Publish","id":"6f82a453-0495-4669-93d1-543862a3d6ff","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"url":"{{VideotubeServer}}/videos/toggle/publish/6638f309fdadc171a9ca1104","urlObject":{"path":["videos","toggle","publish","6638f309fdadc171a9ca1104"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"6f82a453-0495-4669-93d1-543862a3d6ff"},{"name":"Update View","event":[{"listen":"test","script":{"exec":["pm.test(\"Response status code is 200\", function () {","    pm.expect(pm.response.code).to.equal(200);","});","","","pm.test(\"Content type is application/json\", function () {","  pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");","});","","","pm.test(\"Data object should exist and be an object\", function () {","  const responseData = pm.response.json();","  ","  pm.expect(responseData).to.be.an('object');","  pm.expect(responseData.data).to.exist.and.to.be.an('object');","});","","","pm.test(\"Ensure 'isSuccess' is a boolean\", function () {","  const responseData = pm.response.json();","  pm.expect(responseData.isSuccess).to.be.a('boolean');","});","","","pm.test(\"Verify 'views' is a non-negative integer\", function () {","  const responseData = pm.response.json();","","  pm.expect(responseData).to.be.an('object');","  pm.expect(responseData.data.views).to.be.a('number').and.to.be.at.least(0);","});"],"type":"text/javascript"}}],"id":"2cc158a0-6e60-41a7-957e-e4edf0f7bda3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"url":"{{VideotubeServer}}/videos/view/66200eb8e5462ad63f87f7fc","urlObject":{"path":["videos","view","66200eb8e5462ad63f87f7fc"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"2cc158a0-6e60-41a7-957e-e4edf0f7bda3"}],"id":"1904b1a2-3d5b-45bb-ac9b-cd99832bc188","description":"<p>Route Tests for Video Controllers</p>\n","_postman_id":"1904b1a2-3d5b-45bb-ac9b-cd99832bc188"},{"name":"Tweet","item":[{"name":"Create Tweet","id":"cecbab31-18fc-48f0-af6b-898787603253","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"urlencoded","urlencoded":[{"key":"tweet","value":"this is tweet 7","type":"text"}]},"url":"{{VideotubeServer}}/tweets","urlObject":{"path":["tweets"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"cecbab31-18fc-48f0-af6b-898787603253"},{"name":"Get User Tweet","event":[{"listen":"test","script":{"exec":["pm.test(\"Response status code is 200\", function () {","  pm.expect(pm.response.code).to.equal(200);","});","","","pm.test(\"Response Content-Type is application/json\", function () {","    pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");","});","","","pm.test(\"Validate the data object and its fields\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData).to.be.an('object');","    pm.expect(responseData.data).to.exist.and.to.be.an('array');","","    responseData.data.forEach(function(item) {","        pm.expect(item).to.be.an('object');","        pm.expect(item._id).to.be.a('string');","        pm.expect(item.content).to.be.a('string');","        pm.expect(item.owner).to.exist.and.to.be.an('object');","        pm.expect(item.owner._id).to.be.a('string');","        pm.expect(item.owner.username).to.be.a('string');","        pm.expect(item.owner.fullName).to.be.a('string');","        pm.expect(item.owner.avatar).to.be.a('string');","        pm.expect(item.createdAt).to.be.a('string');","        pm.expect(item.updatedAt).to.be.a('string');","        pm.expect(item.totalLikes).to.be.a('number');","        pm.expect(item.totalDisLikes).to.be.a('number');","        pm.expect(item.isLiked).to.be.a('boolean');","        pm.expect(item.isDisLiked).to.be.a('boolean');","    });","});","","","pm.test(\"TotalLikes and TotalDisLikes are non-negative integers\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData).to.be.an('object');","    responseData.data.forEach(tweet => {","        pm.expect(tweet.totalLikes).to.be.a('number').and.to.be.at.least(0);","        pm.expect(tweet.totalDisLikes).to.be.a('number').and.to.be.at.least(0);","    });","});","","","pm.test(\"Ensure that 'createdAt' and 'updatedAt' are in a valid date format\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData).to.be.an('object');","    responseData.data.forEach(tweet => {","        pm.expect(tweet.createdAt).to.match(/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$/);","        pm.expect(tweet.updatedAt).to.match(/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$/);","    });","});"],"type":"text/javascript"}}],"id":"4af2ca72-664e-48c1-b46c-a02c58fb0408","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{VideotubeServer}}/tweets/users/660700de7f10c596bcd506a7","urlObject":{"path":["tweets","users","660700de7f10c596bcd506a7"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"4af2ca72-664e-48c1-b46c-a02c58fb0408"},{"name":"Get All Tweets","event":[{"listen":"test","script":{"exec":["pm.test(\"Response status code is 200\", function () {","    pm.expect(pm.response.code).to.equal(200);","});","","","pm.test(\"Content-Type is application/json\", function () {","    pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");","});","","","pm.test(\"Validate the structure of the owner object\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData.data).to.be.an('array').that.is.not.empty;","    ","    responseData.data.forEach(function(tweet) {","        pm.expect(tweet.owner).to.be.an('object');","        pm.expect(tweet.owner._id).to.be.a('string');","        pm.expect(tweet.owner.username).to.be.a('string');","        pm.expect(tweet.owner.fullName).to.be.a('string');","        pm.expect(tweet.owner.avatar).to.be.a('string');","    });","});","","","pm.test(\"Data array must contain at least one element\", function () {","  const responseData = pm.response.json();","  ","  pm.expect(responseData.data).to.be.an('array').that.is.not.empty;","});","","","pm.test(\"CreatedAt and updatedAt fields are in valid date format\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData.data).to.be.an('array');","    responseData.data.forEach(function(tweet) {","        pm.expect(tweet.createdAt).to.match(/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$/);","        pm.expect(tweet.updatedAt).to.match(/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$/);","    });","});"],"type":"text/javascript"}}],"id":"7019d1f7-69ce-43f4-8f8c-e43f512ddbb6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{VideotubeServer}}/tweets","urlObject":{"path":["tweets"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"7019d1f7-69ce-43f4-8f8c-e43f512ddbb6"},{"name":"Update Tweet","id":"e2242164-cbd9-4251-a823-2f6fe70e0c40","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"urlencoded","urlencoded":[{"key":"tweet","value":"this is updated tweet 3","type":"text"}]},"url":"{{VideotubeServer}}/tweets/665b8871a20a3040b8b7c487","urlObject":{"path":["tweets","665b8871a20a3040b8b7c487"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"e2242164-cbd9-4251-a823-2f6fe70e0c40"},{"name":"Delete Tweet","id":"198d5f5d-8a53-4072-b4e6-5a4f407b146a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"{{VideotubeServer}}/tweets/661f88174871588777ef5bd0","urlObject":{"path":["tweets","661f88174871588777ef5bd0"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"198d5f5d-8a53-4072-b4e6-5a4f407b146a"}],"id":"58c06df9-0ce5-4b21-b833-132d8b36529d","description":"<p>Tweet Routes</p>\n","_postman_id":"58c06df9-0ce5-4b21-b833-132d8b36529d"},{"name":"Subsciption","item":[{"name":"Toggle Subsciption","id":"4aa0baf1-4e41-4c42-b233-26dd8a44921e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"url":"{{VideotubeServer}}/subscription/6637738231138dd636733a7b","urlObject":{"path":["subscription","6637738231138dd636733a7b"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"4aa0baf1-4e41-4c42-b233-26dd8a44921e"},{"name":"Get UserChannel Subscibers","event":[{"listen":"test","script":{"exec":["pm.test(\"Response status code is 200\", function () {","  pm.expect(pm.response.code).to.equal(200);","});","","","pm.test(\"Content-Type header is application/json\", function () {","    pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");","});","","","pm.test(\"Validate the data object\", function () {","  const responseData = pm.response.json();","  ","  pm.expect(responseData).to.be.an('object');","  pm.expect(responseData.data).to.exist.and.to.be.an('array');","  responseData.data.forEach(function(item) {","    pm.expect(item).to.be.an('object');","    pm.expect(item._id).to.exist.and.to.be.a('string');","    pm.expect(item.username).to.exist.and.to.be.a('string');","    pm.expect(item.fullName).to.exist.and.to.be.a('string');","    pm.expect(item.avatar).to.exist.and.to.be.a('string');","    pm.expect(item.subscribersCount).to.exist.and.to.be.a('number');","    pm.expect(item.isSubscribed).to.exist.and.to.be.a('boolean');","  });","});","","","pm.test(\"Data array is present and contains expected number of elements\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData).to.be.an('object');","    pm.expect(responseData.data).to.exist.and.to.be.an('array').with.lengthOf(1);","});","","","pm.test(\"Username and fullName should be non-empty strings\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData).to.be.an('object');","    pm.expect(responseData.data).to.be.an('array').that.is.not.empty;","    ","    responseData.data.forEach(function(subscription) {","        pm.expect(subscription.username).to.be.a('string').and.to.have.lengthOf.at.least(1, \"Username should not be empty\");","        pm.expect(subscription.fullName).to.be.a('string').and.to.have.lengthOf.at.least(1, \"Full name should not be empty\");","        pm.expect(subscription.subscribersCount).to.be.a('number').and.to.be.at.least(0, \"Subscribers count should be a non-negative integer\");","    });","});"],"type":"text/javascript"}}],"id":"7093b6b9-35c8-40cd-bbad-d1334528a5b5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{VideotubeServer}}/subscription/660700de7f10c596bcd506a7","urlObject":{"path":["subscription","660700de7f10c596bcd506a7"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"7093b6b9-35c8-40cd-bbad-d1334528a5b5"},{"name":"Get Subscibed Channels","event":[{"listen":"test","script":{"exec":["pm.test(\"Response status code is 200\", function () {","    pm.response.to.have.status(200);","});","","","pm.test(\"Content type is application/json\", function () {","    pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");","});","","","pm.test(\"Validate the data object\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData).to.be.an('object');","    pm.expect(responseData.data).to.exist.and.to.be.an('array');","});","","","pm.test(\"Data array is present and contains the expected number of elements\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData).to.be.an('object');","    pm.expect(responseData.data).to.exist.and.to.be.an('array');","    pm.expect(responseData.data).to.have.lengthOf(1);","});","","","pm.test(\"Validate _id, username, fullName, avatar, and isSubscribed properties\", function () {","    const responseData = pm.response.json();","","    pm.expect(responseData).to.be.an('object');","    pm.expect(responseData._id).to.be.a('string').and.to.have.lengthOf.at.least(1, \"_id should be a non-empty string\");","    pm.expect(responseData.username).to.be.a('string').and.to.have.lengthOf.at.least(1, \"username should be a non-empty string\");","    pm.expect(responseData.fullName).to.be.a('string').and.to.have.lengthOf.at.least(1, \"fullName should be a non-empty string\");","    pm.expect(responseData.avatar).to.be.a('string').and.to.have.lengthOf.at.least(1, \"avatar should be a non-empty string\");","    pm.expect(responseData.isSubscribed).to.be.a('boolean').and.to.be.true;","});"],"type":"text/javascript"}}],"id":"cf994f32-c743-4a79-84ef-6dbf9927834b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{VideotubeServer}}/subscription/users/660700de7f10c596bcd506a7","urlObject":{"path":["subscription","users","660700de7f10c596bcd506a7"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"cf994f32-c743-4a79-84ef-6dbf9927834b"}],"id":"5dc126bb-3bfa-4b39-9e31-217232c811e5","description":"<p>Subscription Routes</p>\n","_postman_id":"5dc126bb-3bfa-4b39-9e31-217232c811e5"},{"name":"Playlist","item":[{"name":"Get Playlist by Id","event":[{"listen":"test","script":{"exec":["pm.test(\"Response status code is 200\", function () {","    pm.expect(pm.response.code).to.equal(200);","});","","","pm.test(\"Content-Type header is application/json\", function () {","    pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");","});","","","pm.test(\"Validate the structure of the 'data' object\", function () {","  const responseData = pm.response.json();","","  pm.expect(responseData.data).to.be.an('object');","  pm.expect(responseData.data._id).to.exist.and.to.be.a('string');","  pm.expect(responseData.data.name).to.exist.and.to.be.a('string');","  pm.expect(responseData.data.description).to.exist.and.to.be.a('string');","  pm.expect(responseData.data.videos).to.exist.and.to.be.an('array');","  pm.expect(responseData.data.owner).to.exist.and.to.be.an('object');","  pm.expect(responseData.data.createdAt).to.exist.and.to.be.a('string');","  pm.expect(responseData.data.updatedAt).to.exist.and.to.be.a('string');","  pm.expect(responseData.data.thumbnail).to.exist.and.to.be.a('string');","  pm.expect(responseData.data.videosCount).to.exist.and.to.be.a('number');","  pm.expect(responseData.data.totalViews).to.exist.and.to.be.a('number');","});","","","pm.test(\"Videos array is present and has expected number of elements\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData).to.be.an('object');","    pm.expect(responseData.data.videos).to.exist.and.to.be.an('array');","    pm.expect(responseData.data.videos).to.have.lengthOf.at.least(1);","});","","","pm.test(\"Owner object is present with required fields\", function () {","    const responseData = pm.response.json();","","    pm.expect(responseData).to.be.an('object');","    pm.expect(responseData.data.owner).to.exist;","    pm.expect(responseData.data.owner._id).to.exist;","    pm.expect(responseData.data.owner.username).to.exist;","    pm.expect(responseData.data.owner.fullName).to.exist;","    pm.expect(responseData.data.owner.avatar).to.exist;","});"],"type":"text/javascript"}}],"id":"2f1de479-d077-4daa-ad12-e5591e0805fe","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{VideotubeServer}}/playlist/661fa4b22aaeee9e3f434823","urlObject":{"path":["playlist","661fa4b22aaeee9e3f434823"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"2f1de479-d077-4daa-ad12-e5591e0805fe"},{"name":"Get User Playlist","event":[{"listen":"test","script":{"exec":["pm.test(\"Response status code is 200\", function () {","  pm.expect(pm.response.code).to.equal(200);","});","","","pm.test(\"Content type is application/json\", function () {","    pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");","});","","","pm.test(\"Data array contains required fields\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData.data).to.be.an('array');","    ","    responseData.data.forEach(function(item) {","        pm.expect(item).to.include.all.keys('_id', 'name', 'description', 'owner', 'createdAt', 'updatedAt', 'thumbnail', 'videosCount', 'totalViews');","    });","});","","","pm.test(\"Validate the owner object - _id, username, fullName, avatar\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData).to.be.an('object');","    pm.expect(responseData.data).to.be.an('array').that.is.not.empty;","    ","    responseData.data.forEach(function(playlist) {","        pm.expect(playlist.owner).to.be.an('object');","        pm.expect(playlist.owner._id).to.exist.and.to.be.a('string');","        pm.expect(playlist.owner.username).to.exist.and.to.be.a('string');","        pm.expect(playlist.owner.fullName).to.exist.and.to.be.a('string');","        pm.expect(playlist.owner.avatar).to.exist.and.to.be.a('string');","    });","});","","","pm.test(\"CreatedAt and updatedAt fields are in a valid date format\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData).to.be.an('object');","    responseData.data.forEach(function(playlist) {","        if (playlist.createdAt) {","            pm.expect(playlist.createdAt).to.match(/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$/);","        }","        if (playlist.updatedAt) {","            pm.expect(playlist.updatedAt).to.match(/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$/);","        }","    });","});"],"type":"text/javascript"}}],"id":"e18d4b77-7334-44bd-a96b-fe5cea345a0f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{VideotubeServer}}/playlist/users/660700de7f10c596bcd506a7","urlObject":{"path":["playlist","users","660700de7f10c596bcd506a7"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"e18d4b77-7334-44bd-a96b-fe5cea345a0f"},{"name":"Get User Video Playlist","id":"02d9143d-8c73-4291-a393-9cfeb59b0cd9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{VideotubeServer}}/playlist/user/playlists/6633ec57588626d93f0b08af","urlObject":{"path":["playlist","user","playlists","6633ec57588626d93f0b08af"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"02d9143d-8c73-4291-a393-9cfeb59b0cd9"},{"name":"Create Playlist","id":"58160e20-7fd3-4389-933d-338dd27d021a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"urlencoded","urlencoded":[{"key":"name","value":"Meditation Music","type":"text"},{"key":"description","value":"Playlist 4","type":"text","disabled":true}]},"url":"{{VideotubeServer}}/playlist","urlObject":{"path":["playlist"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"58160e20-7fd3-4389-933d-338dd27d021a"},{"name":"Add Video","id":"c58e3f61-7745-407e-a47d-e58f9b0427cb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"url":"{{VideotubeServer}}/playlist/add/665c0be5dccb0ebb9ba4866f/66200eb8e5462ad63f87f7fc","urlObject":{"path":["playlist","add","665c0be5dccb0ebb9ba4866f","66200eb8e5462ad63f87f7fc"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"c58e3f61-7745-407e-a47d-e58f9b0427cb"},{"name":"Remove Video","id":"c16b5677-df4b-4690-8551-6b050ccd1181","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"url":"{{VideotubeServer}}/playlist/remove/66390a5e3467c5ed2ab5760e/66200eb8e5462ad63f87f7fc","urlObject":{"path":["playlist","remove","66390a5e3467c5ed2ab5760e","66200eb8e5462ad63f87f7fc"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"c16b5677-df4b-4690-8551-6b050ccd1181"},{"name":"Update Playlist","id":"5cd2195c-3201-469e-8a73-e5922502e9bf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"urlencoded","urlencoded":[{"key":"name","value":"Updated Name 2","type":"text"},{"key":"description","value":"Updated Description 2","type":"text"}]},"url":"{{VideotubeServer}}/playlist/661fa47c2aaeee9e3f434820","urlObject":{"path":["playlist","661fa47c2aaeee9e3f434820"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"5cd2195c-3201-469e-8a73-e5922502e9bf"},{"name":"Delete Playlist","id":"0dfbd256-019a-4449-8fec-133410ebbd4f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"{{VideotubeServer}}/playlist/661fa47c2aaeee9e3f434820","urlObject":{"path":["playlist","661fa47c2aaeee9e3f434820"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"0dfbd256-019a-4449-8fec-133410ebbd4f"}],"id":"1db6e9ac-fe81-48cf-93f6-3e1358e00af6","description":"<p>Playlist Routes</p>\n","_postman_id":"1db6e9ac-fe81-48cf-93f6-3e1358e00af6"},{"name":"About","item":[{"name":"Get About Channel","event":[{"listen":"test","script":{"exec":["pm.test(\"Response status code is 200\", function () {","    pm.expect(pm.response.code).to.equal(200);","});","","","pm.test(\"Content-Type header is application/json\", function () {","    pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");","});","","","pm.test(\"Validate the data object properties\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData).to.be.an('object');","    pm.expect(responseData.data).to.be.an('object');","    pm.expect(responseData.data._id).to.exist.and.to.be.a('string');","    pm.expect(responseData.data.username).to.exist.and.to.be.a('string');","    pm.expect(responseData.data.email).to.exist.and.to.be.a('string');","    pm.expect(responseData.data.fullName).to.exist.and.to.be.a('string');","    pm.expect(responseData.data.createdAt).to.exist.and.to.be.a('string');","    pm.expect(responseData.data.description).to.exist.and.to.be.a('string');","    pm.expect(responseData.data.links).to.exist.and.to.be.an('array');","    pm.expect(responseData.data.totalVideos).to.exist.and.to.be.a('number');","    pm.expect(responseData.data.totalViews).to.exist.and.to.be.a('number');","    pm.expect(responseData.data.totalTweets).to.exist.and.to.be.a('number');","});","","","pm.test(\"Links array is present and contains expected number of elements\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData).to.be.an('object');","    pm.expect(responseData.data.links).to.exist.and.to.be.an('array');","    pm.expect(responseData.data.links).to.have.lengthOf(1);","});","","","pm.test(\"Name and URL within links array must be non-empty strings\", function () {","    const responseData = pm.response.json();","","    pm.expect(responseData.links).to.be.an('array');","    responseData.links.forEach(function(link) {","        pm.expect(link.name).to.be.a('string').and.to.have.lengthOf.at.least(1, \"Name should not be empty\");","        pm.expect(link.url).to.be.a('string').and.to.have.lengthOf.at.least(1, \"URL should not be empty\");","    });","});"],"type":"text/javascript"}}],"id":"883809a5-09b5-473f-b08c-9433dc2cf62a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{VideotubeServer}}/about/user/660700de7f10c596bcd506a7","urlObject":{"path":["about","user","660700de7f10c596bcd506a7"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"883809a5-09b5-473f-b08c-9433dc2cf62a"},{"name":"Add Description","id":"f935d292-3011-4271-a992-3aa9e6e12af3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"urlencoded","urlencoded":[{"key":"content","value":"$Direct","type":"text"}]},"url":"{{VideotubeServer}}/about/user/description","urlObject":{"path":["about","user","description"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"f935d292-3011-4271-a992-3aa9e6e12af3"},{"name":"Add Link","id":"ba307a92-d21a-49df-aee2-c0725fef1d9f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"urlencoded","urlencoded":[{"key":"name","value":"linkedIn","type":"text"},{"key":"url","value":"https://www.linkedin.com/in/yash-zanzarukiya","type":"text"}]},"url":"{{VideotubeServer}}/about/user/link/add","urlObject":{"path":["about","user","link","add"],"host":["{{VideotubeServer}}"],"query":[{"disabled":true,"key":"name","value":"linkedIn"},{"disabled":true,"key":"URL","value":"https://www.linkedin.com/in/yash-zanzarukiya"}],"variable":[]}},"response":[],"_postman_id":"ba307a92-d21a-49df-aee2-c0725fef1d9f"},{"name":"Remove Link","id":"19a93b6c-8854-4c72-a682-aacd2c46d457","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"{{VideotubeServer}}/about/user/link/6664aaa4d5b9759067498f34","urlObject":{"path":["about","user","link","6664aaa4d5b9759067498f34"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"19a93b6c-8854-4c72-a682-aacd2c46d457"},{"name":"Update Link","id":"adcfe7d5-ce66-42cb-9a98-0a75c45bbd0c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"name","value":"Twitter"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"name","value":"Facebook","type":"text"}]},"url":"{{VideotubeServer}}/about/user/link/6664aaa4d5b9759067498f34","urlObject":{"path":["about","user","link","6664aaa4d5b9759067498f34"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"adcfe7d5-ce66-42cb-9a98-0a75c45bbd0c"}],"id":"77875139-e569-441b-ad76-9b58598dee5a","description":"<p>About Routes</p>\n","_postman_id":"77875139-e569-441b-ad76-9b58598dee5a"},{"name":"Like","item":[{"name":"Get Liked Videos","id":"c6a0cf49-79d7-4ed9-b259-28b8016bf062","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{VideotubeServer}}/like/videos","urlObject":{"path":["like","videos"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"c6a0cf49-79d7-4ed9-b259-28b8016bf062"},{"name":"Toggle Comment Like","id":"6f4a4f4e-520a-4a53-98eb-211b4778d6b2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"url":"{{VideotubeServer}}/like/comment/6658c40186f4b2af25c4de32?toggleLike=false","urlObject":{"path":["like","comment","6658c40186f4b2af25c4de32"],"host":["{{VideotubeServer}}"],"query":[{"key":"toggleLike","value":"false"}],"variable":[]}},"response":[],"_postman_id":"6f4a4f4e-520a-4a53-98eb-211b4778d6b2"},{"name":"Toggle Video Like","id":"0d900d3f-09b8-4442-af1a-0bb571003374","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"url":"{{VideotubeServer}}/like/video/661faabcb56b7247ead8526a","urlObject":{"path":["like","video","661faabcb56b7247ead8526a"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"0d900d3f-09b8-4442-af1a-0bb571003374"},{"name":"Toggle Tweet Like","id":"26ea5edc-08e8-4929-abd2-2d7da2ffc180","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"url":"{{VideotubeServer}}/like/tweet/661f85aa4d71588777ef5bcd","urlObject":{"path":["like","tweet","661f85aa4d71588777ef5bcd"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"26ea5edc-08e8-4929-abd2-2d7da2ffc180"},{"name":"Toggle Like","id":"37113ee8-f7d2-4d60-a76f-d3a0e93ba4cc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"url":"{{VideotubeServer}}/like?toggleLike=true&videoId=6633ec57588626d93f0b08af","urlObject":{"path":["like"],"host":["{{VideotubeServer}}"],"query":[{"key":"toggleLike","value":"true"},{"key":"videoId","value":"6633ec57588626d93f0b08af"},{"disabled":true,"key":"commentId","value":""},{"disabled":true,"key":"tweetId","value":""}],"variable":[]}},"response":[],"_postman_id":"37113ee8-f7d2-4d60-a76f-d3a0e93ba4cc"}],"id":"56cd1d90-dba4-4020-96ae-640b67cc0736","description":"<p>Like Routes</p>\n","_postman_id":"56cd1d90-dba4-4020-96ae-640b67cc0736"},{"name":"Comment","item":[{"name":"Get Video Comments","event":[{"listen":"test","script":{"exec":["pm.test(\"Response status code is 200\", function () {","  pm.expect(pm.response.code).to.equal(200);","});","","","pm.test(\"Content-Type header is application/json\", function () {","    pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");","});","","","pm.test(\"Validate the structure of the 'data' object\", function () {","    const responseData = pm.response.json();","","    pm.expect(responseData).to.be.an('object');","    pm.expect(responseData.data).to.be.an('array');","    responseData.data.forEach(function(comment) {","        pm.expect(comment).to.have.property('_id').that.is.a('string');","        pm.expect(comment).to.have.property('content').that.is.a('string');","        pm.expect(comment).to.have.property('owner').that.is.an('object');","        pm.expect(comment.owner).to.have.property('_id').that.is.a('string');","        pm.expect(comment.owner).to.have.property('username').that.is.a('string');","        pm.expect(comment.owner).to.have.property('fullName').that.is.a('string');","        pm.expect(comment.owner).to.have.property('avatar').that.is.a('string');","        pm.expect(comment).to.have.property('createdAt').that.is.a('string');","        pm.expect(comment).to.have.property('updatedAt').that.is.a('string');","        pm.expect(comment).to.have.property('isOwner').that.is.a('boolean');","        pm.expect(comment).to.have.property('likesCount').that.is.a('number');","        pm.expect(comment).to.have.property('disLikesCount').that.is.a('number');","        pm.expect(comment).to.have.property('isLiked').that.is.a('boolean');","        pm.expect(comment).to.have.property('isDisLiked').that.is.a('boolean');","        pm.expect(comment).to.have.property('isLikedByVideoOwner').that.is.a('boolean');","    });","});","","","pm.test(\"Owner object contains expected fields\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData.data).to.be.an('array');","    responseData.data.forEach(function(comment) {","        pm.expect(comment.owner).to.be.an('object');","        pm.expect(comment.owner._id).to.exist.and.to.be.a('string');","        pm.expect(comment.owner.username).to.exist.and.to.be.a('string');","        pm.expect(comment.owner.fullName).to.exist.and.to.be.a('string');","        pm.expect(comment.owner.avatar).to.exist.and.to.be.a('string');","    });","});","","","pm.test(\"Ensure that createdAt and updatedAt fields are in a valid date format\", function () {","    const responseData = pm.response.json();","","    pm.expect(responseData).to.be.an('object');","    ","    responseData.data.forEach(comment => {","        pm.expect(comment.createdAt).to.match(/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$/);","        pm.expect(comment.updatedAt).to.match(/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$/);","    });","});"],"type":"text/javascript"}}],"id":"93e16c93-f36b-498d-9a35-2441bebb78af","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{VideotubeServer}}/comment/get/66200eb8e5462ad63f87f7fc","urlObject":{"path":["comment","get","66200eb8e5462ad63f87f7fc"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"93e16c93-f36b-498d-9a35-2441bebb78af"},{"name":"Delete Comments","id":"8e9a68b2-0e59-4519-a93f-c718440dab33","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"body":{"mode":"formdata","formdata":[]},"url":"{{VideotubeServer}}/comment/661fd6bf3c5cefeacdff5ab1","urlObject":{"path":["comment","661fd6bf3c5cefeacdff5ab1"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"8e9a68b2-0e59-4519-a93f-c718440dab33"},{"name":"Update Comments","id":"2f1529a0-f957-49f5-b9cf-5cc2e35967a0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"urlencoded","urlencoded":[{"key":"content","value":"This is Updated Comment","type":"text"}]},"url":"{{VideotubeServer}}/comment/661fd6bf3c5cefeacdff5ab1","urlObject":{"path":["comment","661fd6bf3c5cefeacdff5ab1"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"2f1529a0-f957-49f5-b9cf-5cc2e35967a0"},{"name":"Add Comments","id":"e98a0bd8-2eb3-4b6e-89f2-a6414871b243","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"urlencoded","urlencoded":[{"key":"content","value":"Hii i am pizza 4","type":"text"}]},"url":"{{VideotubeServer}}/comment/add/661faabcb56b7247ead8526a","urlObject":{"path":["comment","add","661faabcb56b7247ead8526a"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"e98a0bd8-2eb3-4b6e-89f2-a6414871b243"}],"id":"5b808efa-f397-453c-995e-f37a16b4a93d","description":"<p>Comment Routes</p>\n","_postman_id":"5b808efa-f397-453c-995e-f37a16b4a93d"},{"name":"Dashboard","item":[{"name":"Channel States","id":"c6fbcce2-75af-4c33-839e-eb194d271034","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{VideotubeServer}}/dashboard/states","urlObject":{"path":["dashboard","states"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"c6fbcce2-75af-4c33-839e-eb194d271034"},{"name":"Channel Videos","id":"2c7ba12d-33f9-4b70-970d-de604568c7e5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{VideotubeServer}}/dashboard/videos","urlObject":{"path":["dashboard","videos"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"2c7ba12d-33f9-4b70-970d-de604568c7e5"}],"id":"88357c4d-e476-4fae-beb2-562d21299d1a","description":"<p>Dashboard Routes</p>\n","_postman_id":"88357c4d-e476-4fae-beb2-562d21299d1a"},{"name":"Health Check","event":[{"listen":"test","script":{"exec":["pm.test(\"Response status code is 200\", function () {","  pm.expect(pm.response.code).to.equal(200);","});","","","pm.test(\"Response has the required fields\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData).to.be.an('object');","    pm.expect(responseData).to.have.property('statusCode');","    pm.expect(responseData).to.have.property('data');","    pm.expect(responseData).to.have.property('message');","    pm.expect(responseData).to.have.property('success');","});","","","pm.test(\"Status is a non-empty string\", function () {","  const responseData = pm.response.json();","  ","  pm.expect(responseData).to.be.an('object');","  pm.expect(responseData.data.status).to.be.a('string').and.to.have.lengthOf.at.least(1, \"Status should not be empty\");","});","","","pm.test(\"Content-Type header is application/json\", function () {","    pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");","});","","","pm.test(\"Data object is present and contains expected fields\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData).to.be.an('object');","    pm.expect(responseData.data).to.exist;","    pm.expect(responseData.data.status).to.exist;","});"],"type":"text/javascript"}}],"id":"b7801726-6152-4eb5-81fd-2df058738895","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{VideotubeServer}}/healthcheck","description":"<p>Working</p>\n","urlObject":{"path":["healthcheck"],"host":["{{VideotubeServer}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"b7801726-6152-4eb5-81fd-2df058738895"}]}