{"info":{"_postman_id":"19531205-831d-4173-a641-434084717c88","name":"Practice App-Rate Comment","description":"<html><head></head><body><p>This is the API documentation of rate-comment/ from Group 5 Practice Application. This API has 2 functionalites: GET and POST:</p>\n<p>GET is used to get the number of upvotes and downvotes of a comment.</p>\n<p>POST is used to increment the number of upvotes or downvotes of a comment.</p>\n<p>User must be logged in to use these functionalities. There is basic authentication initialized for Postman testing purposes.</p>\n<p>To use the api, user should enter the id of the comment at the end of the url as seen in the sample calls.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"21027790","collectionId":"19531205-831d-4173-a641-434084717c88","publishedId":"UyxogijQ","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2022-05-20T09:29:37.000Z"},"item":[{"name":"http://127.0.0.1:8000/rate-comment/api/2","id":"d4a1a6a8-93d0-4c32-828c-450ec16e41b5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8000/rate-comment/api/2","description":"<p>This is a successful sample GET call. We are getting 2 keys and their values. they stand for the number of upvotes and downvotes, respectively.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["rate-comment","api","2"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[{"id":"b5a3c7f6-b1f1-4858-a8fe-ecca497e4f95","name":"http://127.0.0.1:8000/rate-comment/api/2","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8000/rate-comment/api/2"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 20 May 2022 09:50:07 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.9.13"},{"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":"35"},{"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    \"nof_upvotes\": 6,\n    \"nof_downvotes\": 1\n}"}],"_postman_id":"d4a1a6a8-93d0-4c32-828c-450ec16e41b5"},{"name":"http://127.0.0.1:8000/rate-comment/api/3","id":"92c7235a-4491-4bb0-9fd4-7fe2c6a1ac0b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://127.0.0.1:8000/rate-comment/api/3","description":"<p>This is an unsuccessful sample GET call. We are getting 1 error key and its message for value which says that comment id does not exist.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["rate-comment","api","3"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[{"id":"3617dfe8-4636-4766-8bc3-3ae9b57173ed","name":"http://127.0.0.1:8000/rate-comment/api/3","originalRequest":{"method":"GET","header":[],"url":"http://127.0.0.1:8000/rate-comment/api/3"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 20 May 2022 09:26:45 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.9.13"},{"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":"47"},{"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    \"error\": \"There is no such comment with id: 3\"\n}"}],"_postman_id":"92c7235a-4491-4bb0-9fd4-7fe2c6a1ac0b"},{"name":"http://127.0.0.1:8000/rate-comment/api/2","event":[{"listen":"test","script":{"id":"4da5d218-658e-48a9-bd56-003e1b961ec4","exec":[""],"type":"text/javascript"}}],"id":"e7cef63f-65f6-4a85-a673-e408f79886ec","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"comment_id\": 2,\r\n    \"vote\": \"1\"            \r\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8000/rate-comment/api/2","description":"<p>This is a successful sample POST call. In our request, we are giving two parameters. As a response, we are getting 2 keys and their values. they stand for the number of upvotes and downvotes, respectively. Since our vote value is 1, we incremented the nof_upvotes.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["rate-comment","api","2"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[{"id":"5ce88063-6328-4952-9576-cf504394ab2e","name":"http://127.0.0.1:8000/rate-comment/api/2","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"comment_id\": 2,\r\n    \"vote\": \"1\"            \r\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8000/rate-comment/api/2"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 20 May 2022 09:51:48 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.9.13"},{"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":"35"},{"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    \"nof_upvotes\": 7,\n    \"nof_downvotes\": 1\n}"}],"_postman_id":"e7cef63f-65f6-4a85-a673-e408f79886ec"},{"name":"http://127.0.0.1:8000/rate-comment/api/3","id":"ee760115-74ef-49a6-8a87-8700ce80cce8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"comment_id\": 3,\r\n    \"vote\": \"1\"            \r\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8000/rate-comment/api/3","description":"<p>This is an unsuccessful sample POST call. In our request, we are giving two parameters. As a response, we are getting 1 error key and its message for value which says that comment id does not exist.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["rate-comment","api","3"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[{"id":"8c3a9135-9eb4-4d0f-8dff-766a010ce9b7","name":"http://127.0.0.1:8000/rate-comment/api/3","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"comment_id\": 3,\r\n    \"vote\": \"1\"            \r\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8000/rate-comment/api/3"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 20 May 2022 09:52:34 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.9.13"},{"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":"51"},{"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 this id\"\n}"}],"_postman_id":"ee760115-74ef-49a6-8a87-8700ce80cce8"}]}