{"info":{"_postman_id":"6af9d33d-1c88-409f-afcc-7aad780f24eb","name":"practice-app-comment-info","description":"<html><head></head><body><p>This api is for the comment-info part of our Practice App in group 5 spring 2022.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"20903160","collectionId":"6af9d33d-1c88-409f-afcc-7aad780f24eb","publishedId":"Uyxhkmby","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2022-05-12T11:42:34.000Z"},"item":[{"name":"get comment info","id":"8ed70a0c-6780-44cb-afe7-59167ad4c1a7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://3.69.144.13:8888/comment-info/api/1","description":"<p><strong>Get Comment info API</strong></p>\n<p>Aim of this API is that taking a specific comment ID and returning the corresponding comment as json.</p>\n<p>http://{ourdomain.com}/comment-info/api/{id}</p>\n<p>By requesting to this address with an id in the corresponding field, one can get the details of the comment.</p>\n<p>Fields of the comment are:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-javascript\">{\n\"ID\",\n\"Body\",\n\"timestamp\",\n\"city_name\",\n\"weather\",\n\"user\",\n\"post\"\n}\n\n</code></pre>\n","urlObject":{"protocol":"http","port":"8888","path":["comment-info","api","1"],"host":["3","69","144","13"],"query":[],"variable":[]}},"response":[{"id":"33c0998f-7452-40ef-a7da-412041864cac","name":"GET comment info example with id 2","originalRequest":{"method":"GET","header":[],"url":"http://3.69.144.13:8888/comment-info/api/2"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 10 May 2022 10:47:09 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.8.9"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept, Cookie"},{"key":"Allow","value":"GET, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"135"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 2,\n    \"body\": \"ikincidenemecomment\",\n    \"timestamp\": \"2022-05-10T10:19:42.322618Z\",\n    \"city_name\": \"Konya\",\n    \"weather\": \"Rainy\",\n    \"user\": 1,\n    \"post\": 1\n}"},{"id":"a209ef01-9257-4e23-8a87-6138dd9d192c","name":"GET comment info example with non existed comment","originalRequest":{"method":"GET","header":[],"url":"http://3.69.144.13:8888/comment-info/api/7"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 10 May 2022 10:54:17 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.8.9"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept, Cookie"},{"key":"Allow","value":"GET, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"49"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"There is no such comment with id: 7\"\n}"}],"_postman_id":"8ed70a0c-6780-44cb-afe7-59167ad4c1a7"},{"name":"practice-app-comment-info POST","id":"e61c4a51-b115-4fd0-84f9-cfa2903b2876","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"body","value":"hello, this is an updated body message","type":"text"},{"key":"city_name","value":"istanbul","type":"text"}]},"url":"http://3.69.144.13:8888/comment-info/api/1","description":"<p><strong>POST comment info API</strong></p>\n<p>This API is the POST part of comment-info API.</p>\n<p>Aim of this POST part is that updating a spesific comment given with ID in the body.</p>\n<p>Since the user and corresponding post remains same, this API only focuses on body, timestamp, city_name and weather fields.</p>\n<p>We fetch the data of the weather from an external API.</p>\n<p>Update the timestamp whenever a comment is edited, or updated.</p>\n<p>Also take the body and city_name and update these fields as wanted.</p>\n<p>Sample Body:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-javascript\">{\n    \"body\":\"hello, this is an updated body message\"\n    \"city_name\": \"İstanbul\"\n}\n</code></pre>\n","urlObject":{"protocol":"http","port":"8888","path":["comment-info","api","1"],"host":["3","69","144","13"],"query":[],"variable":[]}},"response":[{"id":"0dc907db-0394-4d00-ac7b-948786494801","name":"POST comment info example correct","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"body","value":"hello, this is an updated body message","type":"text"},{"key":"city_name","value":"istanbul","type":"text"}]},"url":"http://3.69.144.13:8888/comment-info/api/1"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 12 May 2022 11:39:28 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.8.9"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept, Cookie"},{"key":"Allow","value":"GET, POST, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"157"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 1,\n    \"body\": \"hello, this is an updated body message\",\n    \"timestamp\": \"2022-05-12T11:39:27.878444Z\",\n    \"city_name\": \"istanbul\",\n    \"weather\": \"Sunny\",\n    \"user\": 1,\n    \"post\": 1\n}"},{"id":"e3d7a33d-f200-4e7e-b453-56281106d539","name":"POST trying to change a comment that doesn't exist","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"body","value":"hello, this is an updated body message","type":"text"},{"key":"city_name","value":"istanbul","type":"text"}]},"url":"http://3.69.144.13:8888/comment-info/api/3"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 12 May 2022 11:39:59 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.8.9"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept, Cookie"},{"key":"Allow","value":"GET, POST, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"49"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"There is no such comment with id: 3\"\n}"},{"id":"a4d14011-54b1-4cc5-8fda-cf39287cff69","name":"POST unknown city name, weather not found","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"body","value":"hello, this is an updated body message","type":"text"},{"key":"city_name","value":"istanbula","type":"text"}]},"url":"http://3.69.144.13:8888/comment-info/api/1"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 12 May 2022 11:40:25 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.8.9"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept, Cookie"},{"key":"Allow","value":"GET, POST, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"182"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 1,\n    \"body\": \"hello, this is an updated body message\",\n    \"timestamp\": \"2022-05-12T11:40:25.337363Z\",\n    \"city_name\": \"istanbula\",\n    \"weather\": \"There is no matching weather.\",\n    \"user\": 1,\n    \"post\": 1\n}"}],"_postman_id":"e61c4a51-b115-4fd0-84f9-cfa2903b2876"},{"name":"New Request","id":"e525e91b-ec83-4942-9075-13e8900cba6f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"e525e91b-ec83-4942-9075-13e8900cba6f"}]}