{"info":{"_postman_id":"a527e40e-2e38-4536-8416-676501bf376f","name":"Cafe, Wifi and Mountain Views","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"26061389","collectionId":"a527e40e-2e38-4536-8416-676501bf376f","publishedId":"2s93sc4CKn","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2023-06-09T17:45:48.000Z"},"item":[{"name":"All Cafes","id":"41d392e2-6149-4add-9b81-c89e26d1e339","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://127.0.0.1:5000/get_all_cafes","description":"<p>StartFragment</p>\n<p>The /get_all_cafes route will give all cafes in the database as output</p>\n<p>EndFragment</p>\n","urlObject":{"protocol":"http","port":"5000","path":["get_all_cafes"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[{"id":"8818d655-b64a-4617-82ed-832ffe36c1c4","name":"Get all cafes","originalRequest":{"method":"GET","header":[],"url":"http://127.0.0.1:5000/get_all_cafes"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Werkzeug/2.3.4 Python/3.11.1"},{"key":"Date","value":"Thu, 15 Jun 2023 17:18:45 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"318"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"cafes\": [\n        {\n            \"close\": \"09:00PM\",\n            \"id\": 1,\n            \"location\": \"333 Banff Ave, Banff, AB T1L 1B1\",\n            \"maps_url\": \"https://goo.gl/maps/Ng7tEeEza3y58H7g8\",\n            \"mountain_views\": true,\n            \"name\": \"Good Earth Cafe\",\n            \"open\": \"06:30AM\",\n            \"sockets\": false,\n            \"wifi\": true\n        }\n    ]\n}"}],"_postman_id":"41d392e2-6149-4add-9b81-c89e26d1e339"},{"name":"Search Cafe by name","id":"90025408-351a-4103-84bc-f4d45a3c4d34","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://127.0.0.1:5000/search_cafe?name=Starbucks","description":"<p>This /search_cafe route will search the cafe database for a cafe that matches the name queried.</p>\n<p>Use the name parameter to pass in a cafe name</p>\n","urlObject":{"protocol":"http","port":"5000","path":["search_cafe"],"host":["127","0","0","1"],"query":[{"key":"name","value":"Starbucks"}],"variable":[]}},"response":[{"id":"4691c91d-93fe-49a9-8591-192c0e3f4e50","name":"Search Cafe by name 'Starbucks'","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://127.0.0.1:5000/search_cafe?name=Starbucks","protocol":"http","host":["127","0","0","1"],"port":"5000","path":["search_cafe"],"query":[{"key":"name","value":"Starbucks"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Werkzeug/2.3.4 Python/3.11.1"},{"key":"Date","value":"Thu, 15 Jun 2023 17:21:30 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"297"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"cafe\": {\n        \"close\": \"08:00PM\",\n        \"id\": 2,\n        \"location\": \"201 Banff Avenue, Avenue Mall, Banff, AB T1L 1A1\",\n        \"maps_url\": \"https://goo.gl/maps/cNbKnD4P9cHVjszN9\",\n        \"mountain_views\": true,\n        \"name\": \"Starbucks\",\n        \"open\": \"06:00AM\",\n        \"sockets\": false,\n        \"wifi\": true\n    }\n}"}],"_postman_id":"90025408-351a-4103-84bc-f4d45a3c4d34"},{"name":"Add Cafe","id":"89e1f506-830c-4d33-88ed-c479ea5494de","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"urlencoded","urlencoded":[{"key":"name","value":"Good Earth Cafe","type":"text"},{"key":"location","value":"333 Banff Ave, Banff, AB T1L 1B1","type":"text"},{"key":"maps_url","value":"https://goo.gl/maps/Ng7tEeEza3y58H7g8","type":"text"},{"key":"open","value":"06:30AM","type":"text"},{"key":"close","value":"09:00PM","type":"text"},{"key":"wifi","value":"1","type":"text"},{"key":"sockets","value":"","type":"text"},{"key":"mountain_views","value":"1","type":"text"}]},"url":"http://127.0.0.1:5000/add-api","description":"<p>the /add_api route will add a new cafe to the database. Use the parameters in the query to add all details.</p>\n","urlObject":{"protocol":"http","port":"5000","path":["add-api"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[{"id":"6587c8f4-0185-48d8-834e-fac041ede9b7","name":"Add Success Message","originalRequest":{"method":"POST","header":[],"body":{"mode":"urlencoded","urlencoded":[{"key":"name","value":"Good Earth Cafe","type":"text"},{"key":"location","value":"333 Banff Ave, Banff, AB T1L 1B1","type":"text"},{"key":"maps_url","value":"https://goo.gl/maps/Ng7tEeEza3y58H7g8","type":"text"},{"key":"open","value":"06:30AM","type":"text"},{"key":"close","value":"09:00PM","type":"text"},{"key":"wifi","value":"1","type":"text"},{"key":"sockets","value":"","type":"text"},{"key":"mountain_views","value":"1","type":"text"}]},"url":"http://127.0.0.1:5000/add-api"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Werkzeug/2.3.4 Python/3.11.1"},{"key":"Date","value":"Thu, 15 Jun 2023 17:17:52 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"71"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"response\": {\n        \"success\": \"Successfully added a new cafe\"\n    }\n}"}],"_postman_id":"89e1f506-830c-4d33-88ed-c479ea5494de"},{"name":"Update opening time","id":"b0e3831a-292e-44ff-b3dc-6958db171e81","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"url":"http://127.0.0.1:5000/update-open/1?open=06:00AM","description":"<p>The /update-open/ route will update the opening time for the cafe with the ID . Pass in ID directly into the request URL. Pass in new opening time with parameter .</p>\n","urlObject":{"protocol":"http","port":"5000","path":["update-open","1"],"host":["127","0","0","1"],"query":[{"key":"open","value":"06:00AM"}],"variable":[]}},"response":[{"id":"59d24d9a-c0da-43c5-99f5-e5c38cc42911","name":"Update opening time non-existent Cafe","originalRequest":{"method":"PATCH","header":[],"url":{"raw":"http://127.0.0.1:5000/update-open/2?open=06:00AM","protocol":"http","host":["127","0","0","1"],"port":"5000","path":["update-open","2"],"query":[{"key":"open","value":"06:00AM"}]}},"status":"NOT FOUND","code":404,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Werkzeug/2.3.4 Python/3.11.1"},{"key":"Date","value":"Mon, 12 Jun 2023 14:56:44 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"84"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"Not found\": \"The cafe you are looking for doesn't exist.\"\n    }\n}"},{"id":"e989f6ae-40b3-4d53-999c-3bef8cf05bd8","name":"Update opening time success","originalRequest":{"method":"PATCH","header":[],"url":{"raw":"http://127.0.0.1:5000/update-open/2?open=06:00AM","protocol":"http","host":["127","0","0","1"],"port":"5000","path":["update-open","2"],"query":[{"key":"open","value":"06:00AM"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Werkzeug/2.3.4 Python/3.11.1"},{"key":"Date","value":"Mon, 12 Jun 2023 14:57:08 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"62"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"Success\": \"You successfully updated the opening time.\"\n}"}],"_postman_id":"b0e3831a-292e-44ff-b3dc-6958db171e81"},{"name":"Update closing time","id":"49ffa6ce-7050-4846-ba69-51aa501dbac7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"url":"http://127.0.0.1:5000/update-close/1?close=07:00PM","description":"<p>The /update-close/ route will update the closing time for the cafe with the ID . Pass in ID directly into the request URL. Pass in new closing time with parameter .</p>\n","urlObject":{"protocol":"http","port":"5000","path":["update-close","1"],"host":["127","0","0","1"],"query":[{"key":"close","value":"07:00PM"}],"variable":[]}},"response":[{"id":"7f6efe74-1e23-44ad-9c6b-032fb1a09688","name":"Update closing time non-existent Cafe","originalRequest":{"method":"PATCH","header":[],"url":{"raw":"http://127.0.0.1:5000/update-close/2?close=10:00PM","protocol":"http","host":["127","0","0","1"],"port":"5000","path":["update-close","2"],"query":[{"key":"close","value":"10:00PM"}]}},"status":"NOT FOUND","code":404,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Werkzeug/2.3.4 Python/3.11.1"},{"key":"Date","value":"Mon, 12 Jun 2023 14:57:27 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"84"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"Not found\": \"The cafe you are looking for doesn't exist.\"\n    }\n}"},{"id":"3b09a2f3-6b51-4ae9-b9e2-f1d4175ef2ae","name":"Update closing time success","originalRequest":{"method":"PATCH","header":[],"url":{"raw":"http://127.0.0.1:5000/update-close/2?close=10:00PM","protocol":"http","host":["127","0","0","1"],"port":"5000","path":["update-close","2"],"query":[{"key":"close","value":"10:00PM"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Werkzeug/2.3.4 Python/3.11.1"},{"key":"Date","value":"Mon, 12 Jun 2023 14:57:43 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"62"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"Success\": \"You successfully updated the closing time.\"\n}"}],"_postman_id":"49ffa6ce-7050-4846-ba69-51aa501dbac7"},{"name":"Delete Cafe","id":"64565cf0-996e-498a-9258-db8c3ed0d4a0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://127.0.0.1:5000/report-closed/1?api_key=TopSecretAPIKey","description":"<p>The /report-closed/ route, deletes a Cafe from the database. Pass in the ID  in the request URL. This route needs an API which can be passed in with the param api_key.</p>\n","urlObject":{"protocol":"http","port":"5000","path":["report-closed","1"],"host":["127","0","0","1"],"query":[{"key":"api_key","value":"TopSecretAPIKey"}],"variable":[]}},"response":[{"id":"4a82a456-f0f6-476d-b18b-56c3e84f64ef","name":"Delete Cafe non-existent Cafe","originalRequest":{"method":"DELETE","header":[],"url":{"raw":"http://127.0.0.1:5000/report-closed/5?api_key=TopSecretAPIKey","protocol":"http","host":["127","0","0","1"],"port":"5000","path":["report-closed","5"],"query":[{"key":"api_key","value":"TopSecretAPIKey"}]}},"status":"NOT FOUND","code":404,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Werkzeug/2.3.4 Python/3.11.1"},{"key":"Date","value":"Mon, 12 Jun 2023 14:57:49 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"84"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"Not found\": \"The cafe you are looking for doesn't exist.\"\n    }\n}"},{"id":"5094348c-ab79-415f-b229-6972ae33181f","name":"Delete Cafe Success Message","originalRequest":{"method":"DELETE","header":[],"url":"http://127.0.0.1:5000/report-closed/5"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Werkzeug/2.3.4 Python/3.11.1"},{"key":"Date","value":"Mon, 12 Jun 2023 14:58:02 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"86"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": {\n        \"Success\": \"You successfully reported the cafe as closed.\"\n    }\n}"},{"id":"f973de13-5dd1-453b-860c-acf71cd423ca","name":"Delete Cafe without API key","originalRequest":{"method":"DELETE","header":[],"url":"http://127.0.0.1:5000/report-closed/5"},"status":"FORBIDDEN","code":403,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Werkzeug/2.3.4 Python/3.11.1"},{"key":"Date","value":"Mon, 12 Jun 2023 14:58:10 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"105"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"Forbidden\": \"Sorry, that's not allowed, make sure you have the right api-key.\"\n    }\n}"}],"_postman_id":"64565cf0-996e-498a-9258-db8c3ed0d4a0"}]}