{"info":{"_postman_id":"28ac1802-8262-4054-9ec1-6d32e563abf1","name":"fancy-todo","description":"<html><head></head><body><p>A todo list application made with rest-api, express, mongoose, includes 3rd-party api login via google and facebook, and 3rd-party api feature text-to-speech.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"6691212","collectionId":"28ac1802-8262-4054-9ec1-6d32e563abf1","publishedId":"S1Zw9BS2","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2019-06-16T19:17:31.000Z"},"item":[{"name":"list all todos","id":"faf275cd-d75c-4126-85e4-519bd9f36ee0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"access_token","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpbnB1dCI6ImFAYS5jb20iLCJpYXQiOjE1NjA3MDA3NDEsImV4cCI6MTU2MDc4NzE0MSwiaXNzIjoiU3RlZkt3YW4ifQ.E3yRuc7S__DgPq-xljG05ihyZn3LlF09jMI67e2QTws","description":"<p>access token generated by jwt. decoded payload contains user's email.</p>\n","type":"text"}],"url":"http://localhost:3000/api/todos","description":"<p>List all todo items from a logged in user. Headers will have jwt access token generated with user's email as the decoded payload.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","todos"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"faf275cd-d75c-4126-85e4-519bd9f36ee0"},{"name":"add todo","id":"34fe26c7-4054-40b4-844c-7ec29bf2b92f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"access_token","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpbnB1dCI6InRlc3RAbWFpbC5jb20iLCJpYXQiOjE1NjA1OTk5NjgsImV4cCI6MTU2MDY4NjM2OCwiaXNzIjoiU3RlZkt3YW4ifQ._FR44-nf5LFH3UEVMtkK2l9iWLUsLOjpc3bHzkkH_5o","description":"<p>access token generated by jwt. decoded payload contains user's email.</p>\n","type":"text"},{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"name\":\"name of a todo\",\n\t\"description\":\"description of the todo\",\n\t\"dueDate\": \"optional date entry in form YYYY-mm-dd\"\n}"},"url":"http://localhost:3000/api/todos/add","urlObject":{"protocol":"http","port":"3000","path":["api","todos","add"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"34fe26c7-4054-40b4-844c-7ec29bf2b92f"},{"name":"update a todo","id":"9ac8e07c-2a01-4e8c-a2bf-84f09a3807c0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"access_token","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpbnB1dCI6InRlc3RAbWFpbC5jb20iLCJpYXQiOjE1NjA1OTk5NjgsImV4cCI6MTU2MDY4NjM2OCwiaXNzIjoiU3RlZkt3YW4ifQ._FR44-nf5LFH3UEVMtkK2l9iWLUsLOjpc3bHzkkH_5o","description":"<p>access token generated by jwt. decoded payload contains user's email.</p>\n","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"name\": \"editing a todo\",\n\t\"description\": \"some description\",\n\t\"status\": \"in progress\",\n\t\"dueDate\": \"date item in yyyy-mm-dd\"\n}"},"url":"http://localhost:3000/api/todos/update/:userId/:todoId","description":"<p>updates a todo entry after authorizing via middleware. the only place to change the status of a todo entry is via this edit form and it is limited to 3 radio button option.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","todos","update",":userId",":todoId"],"host":["localhost"],"query":[],"variable":[{"id":"d4198510-6dfd-4c55-b331-a97b4d809494","type":"string","value":"","key":"userId"},{"id":"c5d2ebbe-5274-440c-b5b9-ad9a4bed41c9","type":"string","value":"","key":"todoId"}]}},"response":[],"_postman_id":"9ac8e07c-2a01-4e8c-a2bf-84f09a3807c0"},{"name":"delete a todo by id","id":"5000733e-350d-4336-8e9a-c57c87dc03da","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"access_token","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpbnB1dCI6ImFAYS5jb20iLCJpYXQiOjE1NjA2NTk5NDAsImV4cCI6MTU2MDc0NjM0MCwiaXNzIjoiU3RlZkt3YW4ifQ.dmDrt83Eo_auwW9TC6eFgOzT33oNug5KMA2zw8p8Ofw","description":"<p>access token generated by jwt. decoded payload contains user's email.</p>\n","type":"text"}],"url":"http://localhost:3000/api/todos/del/:userId/:id","description":"<p>deletes a todo entry after verifying the logged in user and the user id in the parameter matches. proceeds to delete a todo entry with owner userid and _id todoId from params.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","todos","del",":userId",":id"],"host":["localhost"],"query":[],"variable":[{"id":"aed3bfa6-b5f7-40b0-8604-f54dafc7d8b6","type":"string","value":"","key":"userId"},{"id":"fa09bd1b-768f-41ea-a724-f3d1d8ecdc56","type":"string","value":"","key":"id"}]}},"response":[],"_postman_id":"5000733e-350d-4336-8e9a-c57c87dc03da"},{"name":"reads a todo entry (tts)","id":"7b6052c2-e18f-4f97-9f7a-7f415619c2c1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"access_token","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpbnB1dCI6ImFAYS5jb20iLCJpYXQiOjE1NjA3MDI1NjEsImV4cCI6MTU2MDc4ODk2MSwiaXNzIjoiU3RlZkt3YW4ifQ.2LjaYfUyNPqDL5VYltqJmk4Vv6TdW1P0jxI_-w7WXI0","description":"<p>access token generated by jwt. decoded payload contains user's email.</p>\n","type":"text"}],"url":"http://localhost:3000/api/todos/read/:userId/:id","description":"<p>3rd party api voicer is used to read a todo entry. voicer API key is saved in server dotenv file, and is returned to client to when link to read the todo entry is triggered.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","todos","read",":userId",":id"],"host":["localhost"],"query":[],"variable":[{"id":"fc6ef0fc-9473-47b6-9d91-a098765e5166","type":"string","value":"","key":"userId"},{"id":"75914412-3394-4380-b089-b8b9c61ffeb8","type":"string","value":"","key":"id"}]}},"response":[],"_postman_id":"7b6052c2-e18f-4f97-9f7a-7f415619c2c1"},{"name":"list users","id":"3fb007d2-1730-49b4-8b33-dd4bea64d54b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:3000/api/users","description":"<p>link for backend testing purposes only. lists all registered users.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","users"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"3fb007d2-1730-49b4-8b33-dd4bea64d54b"},{"name":"user register","id":"77634865-9cc6-494a-b96e-ef460d7350ba","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"email\": \"test@mail.com\",\n\t\"password\": \"testpass\"\n}"},"url":"http://localhost:3000/api/users/register","description":"<p>registers a new user using email and password from body.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","users","register"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"77634865-9cc6-494a-b96e-ef460d7350ba"},{"name":"user login","id":"4c05680f-aaf0-4fbc-a4e1-89bdb08502f0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"email\":\"a@a.com\",\n\t\"password\":\"a\"\n}"},"url":"http://localhost:3000/api/users/login","description":"<p>logs in to the app using user email and password from body.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","users","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"4c05680f-aaf0-4fbc-a4e1-89bdb08502f0"},{"name":"user update","id":"42ea9c3e-5227-4fde-8d54-90b2d433a7fa","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"access_token","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpbnB1dCI6ImNoYW5nZWRFbWFpbCIsImlhdCI6MTU2MDYwNjE3OSwiZXhwIjoxNTYwNjkyNTc5LCJpc3MiOiJTdGVmS3dhbiJ9.84a4bLtb2kxpnlDDwn2np_Kb41UlYsLW0Cs7HTRV0gE","description":"<p>access token generated by jwt. decoded payload contains user's email.</p>\n","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"name\":\"anna\",\n\t\"password\":\"changedPass\"\n}"},"url":"http://localhost:3000/api/users/update","description":"<p>updates a user's data. body contains new name and password for user. User's email cannot be changed.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","users","update"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"42ea9c3e-5227-4fde-8d54-90b2d433a7fa"},{"name":"delete current user","id":"0b6e8a8a-7207-4227-82e7-50830d9dd908","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"access_token","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpbnB1dCI6InN0ZWZhbmlrd2FuQGdtYWlsLmNvbSIsImlhdCI6MTU2MDYxMzQ1OSwiZXhwIjoxNTYwNjk5ODU5LCJpc3MiOiJTdGVmS3dhbiJ9.STrImDg3jQKEpMi0d7xYOjKoHy0ENmly1qXV9dQF3hg","description":"<p>access token generated by jwt. decoded payload contains user's email.</p>\n","type":"text"}],"url":"http://localhost:3000/api/users/delete","description":"<p>when link is triggered, current logged in user is deleted from database. logged in user is checked from the access_token.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","users","delete"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"0b6e8a8a-7207-4227-82e7-50830d9dd908"}],"event":[{"listen":"prerequest","script":{"id":"45b126b8-36f4-4a0c-ad71-034dbf9b49b6","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"ad611988-0eb1-463e-bbbd-09cbab49ca36","type":"text/javascript","exec":[""]}}]}