{"info":{"_postman_id":"c5ad297f-35c8-4978-869c-8fc2466e998e","name":"Carnival","description":"<html><head></head><body><p>The <a href=\"https://github.com/repl-it-discord/carnival\">https://github.com/repl-it-discord/carnival</a> API.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"6148471","collectionId":"c5ad297f-35c8-4978-869c-8fc2466e998e","publishedId":"SzYZ1e9H","public":true,"customColor":{"top-bar":"CCCCCC","right-sidebar":"2F2F2F","highlight":"EF5B25"},"publishDate":"2020-04-01T10:19:02.000Z"},"item":[{"name":"Auth","item":[{"name":"OAuth redirect","id":"ab1226f6-25b3-4aab-a269-874229d8b451","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:4000/api/v1/auth/auth/{action}/{provider}","description":"<p>Redirects the user to appropriate url for OAuth2 authorization by the specified provider. In the request, <code>action</code> and <code>provider</code> are variables.</p>\n<p>The valid values for <code>action</code> are: -</p>\n<ol>\n<li><code>login</code></li>\n<li><code>register</code></li>\n</ol>\n<p>The valid values for <code>provider</code> are: -</p>\n<ol>\n<li><code>discord</code></li>\n<li><code>github</code></li>\n<li><code>google</code></li>\n</ol>\n","urlObject":{"path":["auth","auth","{action}","{provider}"],"host":["http://localhost:4000/api/v1"],"query":[],"variable":[]}},"response":[{"id":"6c60ac7e-5dac-4b79-885b-30fc6f18ee60","name":"OAuth redirect","originalRequest":{"method":"GET","header":[],"url":"http://localhost:4000/api/v1/auth/auth/login/discord"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null}],"_postman_id":"ab1226f6-25b3-4aab-a269-874229d8b451"},{"name":"Registration","id":"fe0cfc65-9ba0-4030-8748-beecf6990275","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Cookie","value":"email=Augustine_Waters87@hotmail.com","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"username\": \"Maverick_Legros\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:4000/api/v1/auth/final/submit/","description":"<p>Complete's a user's registration by making an entry to the database of their username and email.</p>\n<p>The email must be provided as a <strong>cookie</strong> named <code>email</code>. This is handled by the backend while the user is redirected back to the website from the OAuth2 provider.</p>\n<p>The <code>username</code> must be provided in in the request body and the <code>content-type</code> should be set to <code>application/json</code>.</p>\n","urlObject":{"path":["auth","final","submit",""],"host":["http://localhost:4000/api/v1"],"query":[],"variable":[]}},"response":[{"id":"c902c070-6d0b-4c45-879a-70fd073e0cd5","name":"Registration (failure)","originalRequest":{"method":"POST","header":[{"key":"Cookie","value":"email=Merlin36@yahoo.com","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"username\": \"Otto.Luettgen88\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:4000/api/v1/auth/final/submit/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"52"},{"key":"ETag","value":"W/\"34-TI5A7KFJ8+eGUxcVLOw+VjUlFcQ\""},{"key":"Date","value":"Wed, 01 Apr 2020 08:40:19 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"error\": \"User already registered.\"\n}"},{"id":"e5e9acea-efef-45ef-9764-f24e9c397b0a","name":"Registration (success)","originalRequest":{"method":"POST","header":[{"key":"Cookie","value":"email=Carlotta_Gerlach24@hotmail.com","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"username\": \"Linnea.Hamill77\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:4000/api/v1/auth/final/submit/"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Set-Cookie","value":"token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZWNyZXRfaWQiOiJ3bkh6NjB1b0oiLCJpYXQiOjE1ODU3MzAzMTJ9.AewttY5NulpWfLtfxzeMQsZV8gS-_w0o1iWaxldnVhA; Path=/"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"16"},{"key":"ETag","value":"W/\"10-oV4hJxRVSENxc/wX8+mA4/Pe4tA\""},{"key":"Date","value":"Wed, 01 Apr 2020 08:38:32 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true\n}"}],"_postman_id":"fe0cfc65-9ba0-4030-8748-beecf6990275"}],"id":"191e2e85-a253-4d93-9699-792c434d5abd","description":"<p>The user authorization routes.</p>\n","_postman_id":"191e2e85-a253-4d93-9699-792c434d5abd"},{"name":"User","item":[{"name":"Login check","id":"3a4bb8be-0f4a-45fb-b73d-0f95bb15d5e6","protocolProfileBehavior":{"disableBodyPruning":true,"disableCookies":true},"request":{"method":"GET","header":[{"key":"Cookie","value":"token=the_user_token","description":"<p>The user token inside a cookie.</p>\n","type":"text"}],"url":"http://localhost:4000/api/v1/user/is-authorized","description":"<p>Checks whether a user is logged in by verifying the <code>token</code> cookie. </p>\n<p>If logged in, returns the user's details.</p>\n<p>If not logged in, returns one of the following: -</p>\n<ol>\n<li><code>404</code> - if the user was not found in the DB (invalid token).</li>\n<li><code>500</code> - if there was an error during the query.</li>\n<li><code>401</code> - if there was no <code>token</code> cookie.</li>\n</ol>\n","urlObject":{"path":["user","is-authorized"],"host":["http://localhost:4000/api/v1"],"query":[],"variable":[]}},"response":[{"id":"7aab44eb-e0b1-4514-9334-02fc8365ec06","name":"Login check (no token)","originalRequest":{"method":"GET","header":[{"key":"Cookie","value":"token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZWNyZXRfaWQiOiIzR3pKSE5mOTciLCJpYXQiOjE1ODU3Mjc2OTl9.eZXvGI87oB9TZRFEXtIXoj3wAyy-v7yxRMDj5n6QPJE","description":"The user token.","type":"text","disabled":true}],"url":{"raw":"http://localhost:4000/api/v1/user/is-authorized","host":["http://localhost:4000/api/v1"],"path":["user","is-authorized"],"query":[{"key":"","value":"","type":"text","disabled":true}]}},"status":"Unauthorized","code":401,"_postman_previewlanguage":"plain","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"text/plain; charset=utf-8"},{"key":"Content-Length","value":"12"},{"key":"ETag","value":"W/\"c-dAuDFQrdjS3hezqxDTNgW7AOlYk\""},{"key":"Date","value":"Wed, 01 Apr 2020 08:04:53 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"Unauthorized"},{"id":"92b4e50d-c005-46e1-86ad-561af30f6a00","name":"Login check (success)","originalRequest":{"method":"GET","header":[{"key":"Cookie","value":"token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZWNyZXRfaWQiOiIzR3pKSE5mOTciLCJpYXQiOjE1ODU3Mjc2OTl9.eZXvGI87oB9TZRFEXtIXoj3wAyy-v7yxRMDj5n6QPJE","description":"The user token.","type":"text"}],"url":{"raw":"http://localhost:4000/api/v1/user/is-authorized","host":["http://localhost:4000/api/v1"],"path":["user","is-authorized"],"query":[{"key":"","value":"","type":"text","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"219"},{"key":"ETag","value":"W/\"db-qHaUKUpd+bBXLqnLnjgfeww/PRk\""},{"key":"Date","value":"Wed, 01 Apr 2020 08:03:27 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"secret_id\": \"3GzJHNf97\",\n    \"user_name\": \"my_username\",\n    \"user_email\": \"someone@example.com\",\n    \"user_games\": null,\n    \"user_preferences\": {\n        \"darkMode\": true\n    },\n    \"createdAt\": \"2020-04-01T07:54:59.109Z\",\n    \"updatedAt\": \"2020-04-01T07:54:59.109Z\"\n}"},{"id":"d6cb0813-c5dd-48fd-9f39-30d69c79d9ff","name":"Login check (server error)","originalRequest":{"method":"GET","header":[{"key":"Cookie","value":"token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZWNyZXRfaWQiOiIzR3pKSE5mOTciLCJpYXQiOjE1ODU3Mjc2OTl9.eZXvGI87oB9TZRFEXtIXoj3wAyy-","description":"The user token.","type":"text"}],"url":{"raw":"http://localhost:4000/api/v1/user/is-authorized","host":["http://localhost:4000/api/v1"],"path":["user","is-authorized"],"query":[{"key":"","value":"","type":"text","disabled":true}]}},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"plain","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"text/plain; charset=utf-8"},{"key":"Content-Length","value":"21"},{"key":"ETag","value":"W/\"15-/6VXivhc2MKdLfIkLcUE47K6aH0\""},{"key":"Date","value":"Wed, 01 Apr 2020 08:04:23 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"Internal Server Error"}],"_postman_id":"3a4bb8be-0f4a-45fb-b73d-0f95bb15d5e6"},{"name":"Update data","id":"0bf619c2-10f6-43d0-9bb6-eccafebdea32","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"userPreferences\": {\n\t\t\"darkMode\": true\n\t},\n\t\"userEmail\": \"Demond40@yahoo.com\",\n\t\"username\": \"Meggie89\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:4000/api/v1/user/update-data","description":"<p>Updates the requested user data. </p>\n<p>Requires <code>Authorization</code> header which must contain the user token as a <code>Bearer</code> token.</p>\n","urlObject":{"path":["user","update-data"],"host":["http://localhost:4000/api/v1"],"query":[],"variable":[]}},"response":[{"id":"1555d664-be87-4871-8a60-3ea2f66901eb","name":"Update data (no username or no auth token)","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"userPreferences\": {\n\t\t\"darkMode\": false\n\t}\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:4000/api/v1/user/update-data"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"58"},{"key":"ETag","value":"W/\"3a-ioAwAwTUYOK500qz0YLfArTX2EI\""},{"key":"Date","value":"Wed, 01 Apr 2020 08:19:03 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"Authentication token or username not provided.\"\n}"},{"id":"60e3b83c-e86d-4067-a05f-a7ea1d0b41d5","name":"Update data (only preferences)","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"userPreferences\": {\n\t\t\"darkMode\": false\n\t},\n\t\"username\": \"my_username\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:4000/api/v1/user/update-data"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"16"},{"key":"ETag","value":"W/\"10-oV4hJxRVSENxc/wX8+mA4/Pe4tA\""},{"key":"Date","value":"Wed, 01 Apr 2020 08:18:41 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true\n}"},{"id":"8a2f31a3-49e0-4b2b-bfd3-abcfb093930f","name":"Update data (only email)","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"userEmail\": \"myemail@testing.com\",\n\t\"username\": \"my_username\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:4000/api/v1/user/update-data"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"16"},{"key":"ETag","value":"W/\"10-oV4hJxRVSENxc/wX8+mA4/Pe4tA\""},{"key":"Date","value":"Wed, 01 Apr 2020 08:18:16 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true\n}"},{"id":"a49612e5-d78f-4d6e-9f78-cdac8b31fec7","name":"Update data (both email and preferences)","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"userEmail\": \"myemail@testing.com\",\n\t\"userPreferences\": {\n\t\t\"darkMode\": false\n\t},\n\t\"username\": \"my_username\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:4000/api/v1/user/update-data"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"16"},{"key":"ETag","value":"W/\"10-oV4hJxRVSENxc/wX8+mA4/Pe4tA\""},{"key":"Date","value":"Wed, 01 Apr 2020 08:17:43 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true\n}"},{"id":"b609c217-535d-4685-9dd9-5f00d9215668","name":"Update data (invalid auth token)","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"userPreferences\": {\n\t\t\"darkMode\": false\n\t},\n\t\"username\": \"my_username\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:4000/api/v1/user/update-data"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"29"},{"key":"ETag","value":"W/\"1d-w1IxQI++3kZwkfKOfjycSkVcWtw\""},{"key":"Date","value":"Wed, 01 Apr 2020 08:19:39 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"invalid signature\"\n}"}],"_postman_id":"0bf619c2-10f6-43d0-9bb6-eccafebdea32"},{"name":"Check username","id":"bc46d5a3-4fba-43a6-9386-ceffa37d6ce5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:4000/api/v1/user/check/Jarred9","description":"<p>Checks whether a username is registered in the database or not.</p>\n<p>Returns <code>true</code> as a <code>string</code> if the user is registered, else returns <code>false</code> as a <code>string</code>.</p>\n","urlObject":{"path":["user","check","Alan.Heaney90"],"host":["http://localhost:4000/api/v1"],"query":[],"variable":[]}},"response":[{"id":"065f43e2-e9a6-4e23-9341-0ed6cfffc201","name":"Check username (true)","originalRequest":{"method":"GET","header":[],"url":"http://localhost:4000/api/v1/user/check/my_username"},"status":"OK","code":200,"_postman_previewlanguage":"html","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"text/html; charset=utf-8"},{"key":"Content-Length","value":"4"},{"key":"ETag","value":"W/\"4-X/5TO4MPCKAyY0ipFgr6/IraRNs\""},{"key":"Date","value":"Wed, 01 Apr 2020 08:28:51 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"true"},{"id":"c7bc3a21-a5e2-424a-8631-b9e4b51b2a5b","name":"Check username (false)","originalRequest":{"method":"GET","header":[],"url":"http://localhost:4000/api/v1/user/check/my_user"},"status":"OK","code":200,"_postman_previewlanguage":"html","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"text/html; charset=utf-8"},{"key":"Content-Length","value":"5"},{"key":"ETag","value":"W/\"5-fLbvuYullyqbUJDcLlF/4U0SywQ\""},{"key":"Date","value":"Wed, 01 Apr 2020 08:29:10 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"false"}],"_postman_id":"bc46d5a3-4fba-43a6-9386-ceffa37d6ce5"}],"id":"834b9312-896d-4c85-bf5e-33dbec6c9534","description":"<p>The user details query and modification routes.</p>\n","_postman_id":"834b9312-896d-4c85-bf5e-33dbec6c9534"},{"name":"Game","item":[{"name":"List games","id":"9dba44d4-8b58-4434-b133-4cdfdc67eb05","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:4000/api/v1/game/list?page=1","description":"<p>Gets a list of games by page number from the database sorted by popularity.</p>\n","urlObject":{"path":["game","list"],"host":["http://localhost:4000/api/v1"],"query":[{"description":{"content":"<p>The page number to list. The first page number in the list is 0.</p>\n","type":"text/plain"},"key":"page","value":"1"}],"variable":[]}},"response":[{"id":"e8798310-e7bf-4c8f-b315-66f990f05118","name":"List games","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:4000/api/v1/game/list?page=1","host":["http://localhost:4000/api/v1"],"path":["game","list"],"query":[{"key":"page","value":"1","description":"The page number to list. The first page number in the list is 0."}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"1355"},{"key":"ETag","value":"W/\"54b-De9L9x0bxYu6bDeIdYhqpA8Bk+w\""},{"key":"Date","value":"Fri, 03 Apr 2020 15:09:06 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"game_id\": 11,\n        \"game_name\": \"three-ways\",\n        \"game_title\": \"Three Ways\",\n        \"game_desc\": \"This is my three ways game. You can move the ball with k, l, and m or arrows. Press enter to play and retry. It's better to play in a new tab. I hope you will enjoy it\",\n        \"talk_url\": \"https://repl.it/talk/share/Three-Ways/12058\",\n        \"game_owner\": \"Equation\",\n        \"repl\": \"Three-Ways-Game\",\n        \"votes\": 38\n    },\n    {\n        \"game_id\": 12,\n        \"game_name\": \"3d-online-multiplayer-shooter\",\n        \"game_title\": \"3D Online Multiplayer Shooter\",\n        \"game_desc\": \"Featured in the Repl.it Newsletter. Made with pure JS (Node.js for server-side). Used the Three.js and Socket.io libraries\",\n        \"talk_url\": \"https://repl.it/talk/share/3D-Online-Multiplayer-Shooter/5323\",\n        \"game_owner\": \"JSer\",\n        \"repl\": \"3D\",\n        \"votes\": 32\n    },\n    {\n        \"game_id\": 13,\n        \"game_name\": \"krossy-road\",\n        \"game_title\": \"Krossy Road\",\n        \"game_desc\": \"This game was developed for educational purposes for Bit By Bit (http://littlebitbybit.org). Worldwide high scores aren't available yet, but based on my personal experience of watching other people play, the current record is 429. Have fun!\",\n        \"talk_url\": \"https://repl.it/talk/share/Krossy-Road/3088\",\n        \"game_owner\": \"derekwan\",\n        \"repl\": \"KrossyRoad\",\n        \"votes\": 28\n    },\n    {\n        \"game_id\": 14,\n        \"game_name\": \"bandwidth-index\",\n        \"game_title\": \"bandwidth index\",\n        \"game_desc\": \"Multi-lateral radical ability\",\n        \"talk_url\": null,\n        \"game_owner\": \"Mikel83\",\n        \"repl\": \"driver-calculate\",\n        \"votes\": 1\n    }\n]"}],"_postman_id":"9dba44d4-8b58-4434-b133-4cdfdc67eb05"},{"name":"Get game data","id":"d6bdba68-8428-4d73-9804-876ecdc95d01","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:4000/api/v1/game/data/{game-id}","description":"<p>Fetches game's data by ID.</p>\n<p>If the <code>Authorization</code> header is set and a <code>Bearer</code> token is passed in it and if the token belongs to the user who owns the game, additional information such as the game's authorization token is also sent.</p>\n<p><code>{game-id}</code> is a variable and can be set to any game's ID.</p>\n","urlObject":{"path":["game","data","{game-id}"],"host":["http://localhost:4000/api/v1"],"query":[],"variable":[]}},"response":[{"id":"74e55615-c5c0-45bc-a147-c6e932ef62ef","name":"Get game data (with auth)","originalRequest":{"method":"GET","header":[],"url":"http://localhost:4000/api/v1/game/data/14"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"314"},{"key":"ETag","value":"W/\"13a-6vl12rZ/73racepkTtMwAXYjtLc\""},{"key":"Date","value":"Fri, 03 Apr 2020 15:10:08 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"game_id\": 14,\n    \"game_name\": \"bandwidth-index\",\n    \"game_title\": \"bandwidth index\",\n    \"game_desc\": \"Multi-lateral radical ability\",\n    \"talk_url\": null,\n    \"game_owner\": \"Mikel83\",\n    \"repl\": \"driver-calculate\",\n    \"author\": \"tkz7bpw92wi\",\n    \"auth_token\": \"dGt6N2Jwdzkyd2k6bHh1bnB3dnFwOHpiOHVnanhiajVjNnlsbDBxajF3dzY3bXVx\",\n    \"game_data\": null,\n    \"votes\": 1\n}"},{"id":"c405fcbb-d8b8-4ec0-a2fc-7cf9acbd3349","name":"Get game data (no auth)","originalRequest":{"method":"GET","header":[],"url":"http://localhost:4000/api/v1/game/data/14"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"194"},{"key":"ETag","value":"W/\"c2-a/O+d1sLnFzQy+WVe42kmdzSvbA\""},{"key":"Date","value":"Fri, 03 Apr 2020 15:10:38 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"game_id\": 14,\n    \"game_name\": \"bandwidth-index\",\n    \"game_title\": \"bandwidth index\",\n    \"game_desc\": \"Multi-lateral radical ability\",\n    \"talk_url\": null,\n    \"game_owner\": \"Mikel83\",\n    \"repl\": \"driver-calculate\",\n    \"votes\": 1\n}"}],"_postman_id":"d6bdba68-8428-4d73-9804-876ecdc95d01"},{"name":"New game","id":"2f10e9ec-eb25-4e9a-b868-db1a7535a0cd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"title\": \"matrix override\",\n\t\"desc\": \"Multi-tiered interactive help-desk\",\n\t\"repl\": \"http://repl.it/@Coty.Raynor/card-compress\",\n\t\"talkLink\": \"https://repl.it/talk/share/CoronaJam-JAM-9/31247\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:4000/api/v1/game/new","description":"<p>Creates a new game's entry in the database.</p>\n<p>Requires <code>Authentication</code> header set to the user's token, with token type set to <code>Bearer</code>.</p>\n","urlObject":{"path":["game","new"],"host":["http://localhost:4000/api/v1"],"query":[],"variable":[]}},"response":[{"id":"b957d82d-6ed4-4d4a-bd9d-c6a11a883d95","name":"New game (without repl talk URL)","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"title\": \"application index\",\n\t\"desc\": \"Seamless 5th generation Graphical User Interface\",\n\t\"repl\": \"http://repl.it/@Lamont90/feed-back up\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:4000/api/v1/game/new"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"421"},{"key":"ETag","value":"W/\"1a5-I0fFK+I3Pak4NpF4PzOfms5C4YU\""},{"key":"Date","value":"Fri, 03 Apr 2020 15:11:18 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"game_id\": 15,\n    \"game_name\": \"alarm-compress\",\n    \"game_title\": \"alarm compress\",\n    \"game_desc\": \"Profound contextually-based hierarchy\",\n    \"author\": \"tkz7bpw92wi\",\n    \"talk_url\": null,\n    \"game_owner\": \"Carissa.DAmore\",\n    \"repl\": \"interface-transmit\",\n    \"votes\": [\n        \"tkz7bpw92wi\"\n    ],\n    \"auth_token\": \"dGt6N2Jwdzkyd2k6aGp3OHRuaDNybDQ1cGI5aXNiMnk2azB0djN2bHBjaXJwaTRu\",\n    \"updatedAt\": \"2020-04-03T15:11:18.577Z\",\n    \"createdAt\": \"2020-04-03T15:11:18.577Z\",\n    \"game_data\": null\n}"},{"id":"dd0004e6-27e4-4b54-afc3-e5a27654b3e5","name":"New game (with talk URL)","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"title\": \"sensor synthesize\",\n\t\"desc\": \"Advanced transitional throughput\",\n\t\"repl\": \"http://repl.it/@Onie.Ebert21/interface-reboot\",\n\t\"talkLink\": \"https://repl.it/talk/share/CoronaJam-JAM-9/31247\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:4000/api/v1/game/new"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"452"},{"key":"ETag","value":"W/\"1c4-osslVMzlZufTRAWHYs/4oXatf/Q\""},{"key":"Date","value":"Fri, 03 Apr 2020 15:12:15 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"game_id\": 16,\n    \"game_name\": \"protocol-input\",\n    \"game_title\": \"protocol input\",\n    \"game_desc\": \"Persistent uniform neural-net\",\n    \"author\": \"tkz7bpw92wi\",\n    \"talk_url\": \"https://repl.it/talk/share/CoronaJam-JAM-9/31247\",\n    \"game_owner\": \"Frida42\",\n    \"repl\": \"microchip-override\",\n    \"votes\": [\n        \"tkz7bpw92wi\"\n    ],\n    \"auth_token\": \"dGt6N2Jwdzkyd2k6enpwYXJ0c3FoZThwYjRuaTQ4cW1wOHpzb2R2bXdzN3BtOXBt\",\n    \"updatedAt\": \"2020-04-03T15:12:15.793Z\",\n    \"createdAt\": \"2020-04-03T15:12:15.793Z\",\n    \"game_data\": null\n}"}],"_postman_id":"2f10e9ec-eb25-4e9a-b868-db1a7535a0cd"},{"name":"Search for games","id":"51f46fc7-8536-43a5-94cc-04055d4529fb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:4000/api/v1/game/search?q=my%20game","description":"<p>Searches for a game in the list of all the games.</p>\n","urlObject":{"path":["game","search"],"host":["http://localhost:4000/api/v1"],"query":[{"description":{"content":"<p>The term to search for (must be URI encoded)</p>\n","type":"text/plain"},"key":"q","value":"my%20game"}],"variable":[]}},"response":[{"id":"a88837b9-8143-47f7-a3a1-369438d68eef","name":"Search for games","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:4000/api/v1/game/search?q=my%20game","host":["http://localhost:4000/api/v1"],"path":["game","search"],"query":[{"key":"q","value":"my%20game","description":"The term to search for (must be URI encoded)"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"624"},{"key":"ETag","value":"W/\"270-+pB3+PPXPVLgZivHgA2nH88/lGM\""},{"key":"Date","value":"Fri, 03 Apr 2020 15:12:37 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"game_id\": 10,\n        \"game_name\": \"adventure-game\",\n        \"game_title\": \"Adventure Game\",\n        \"game_desc\": \"It was for one of my school projects, but i still thought it was good\",\n        \"talk_url\": \"https://repl.it/talk/share/Adventure-Game/4293\",\n        \"game_owner\": \"AidanMott\",\n        \"repl\": \"Adventure-Game\",\n        \"votes\": 44\n    },\n    {\n        \"game_id\": 6,\n        \"game_name\": \"the-fishing-game\",\n        \"game_title\": \"The Fishing Game\",\n        \"game_desc\": \"Explore your way through the different regions by catching the rarest fish you can. Catch em all to fill up your fishedex!\",\n        \"talk_url\": \"https://repl.it/talk/share/The-Fishing-Game/12016\",\n        \"game_owner\": \"AmeliaBlackwell\",\n        \"repl\": \"the-fishing-game\",\n        \"votes\": 84\n    }\n]"}],"_postman_id":"51f46fc7-8536-43a5-94cc-04055d4529fb"},{"name":"Vote","id":"dc6d606b-db06-45b0-94c2-12c68e30bdd3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:4000/api/v1/game/vote/{game-id}","description":"<p>Vote for the specified game.</p>\n<p>This requires an <code>Authorization</code> header to be passed containing the voter's <code>Bearer</code> token.</p>\n<p>The <code>{game-id}</code> in the URL is supposed to be replaced with the game's ID for which the user is voting.</p>\n","urlObject":{"path":["game","vote","{game-id}"],"host":["http://localhost:4000/api/v1"],"query":[],"variable":[]}},"response":[{"id":"dc9ec7b9-5f33-45c4-9f97-583961fabadb","name":"Vote","originalRequest":{"method":"GET","header":[],"url":"http://localhost:4000/api/v1/game/vote/6"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"16"},{"key":"ETag","value":"W/\"10-oV4hJxRVSENxc/wX8+mA4/Pe4tA\""},{"key":"Date","value":"Sat, 04 Apr 2020 07:35:28 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true\n}"}],"_postman_id":"dc6d606b-db06-45b0-94c2-12c68e30bdd3"},{"name":"Remove vote","id":"bc2edcb1-05a1-4182-a91c-4710769bff00","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:4000/api/v1/game/downvote/{game-id}","description":"<p>Removes vote for the specified game.</p>\n<p>This requires an <code>Authorization</code> header to be passed containing the user's <code>Bearer</code> token whose vote is to be removed.</p>\n<p>The <code>{game-id}</code> in the URL is supposed to be replaced with the game's ID for which the user is voting.</p>\n","urlObject":{"path":["game","downvote","{game-id}"],"host":["http://localhost:4000/api/v1"],"query":[],"variable":[]}},"response":[{"id":"ff0bc128-617e-40ec-aaaa-71ec4758c9e5","name":"Remove vote","originalRequest":{"method":"GET","header":[],"url":"http://localhost:4000/api/v1/game/downvote/6"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"16"},{"key":"ETag","value":"W/\"10-oV4hJxRVSENxc/wX8+mA4/Pe4tA\""},{"key":"Date","value":"Sat, 04 Apr 2020 07:35:53 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true\n}"}],"_postman_id":"bc2edcb1-05a1-4182-a91c-4710769bff00"}],"id":"bfd2d38d-7c01-4e01-a7db-e895232f4e6c","description":"<p>The game data query and modification routes.</p>\n","_postman_id":"bfd2d38d-7c01-4e01-a7db-e895232f4e6c"}],"event":[{"listen":"prerequest","script":{"id":"6f2b8ef1-5542-494a-bab7-63cac8d987af","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"a1a35622-34d9-4b91-ae2b-a1cc0c6177b5","type":"text/javascript","exec":[""]}}],"variable":[{"key":"base","value":"http://localhost:4000/api/v1"},{"key":"action","value":"login"},{"key":"provider","value":"discord"}]}