{"info":{"_postman_id":"70949d57-1ab2-970c-5d64-f827a1fcc2d4","name":"egg-vote","description":"<html><head></head><body><h1 id=\"introduction\">Introduction</h1>\n<p>vote backend plateform based on eggjs.</p>\n<h1 id=\"overview\">Overview</h1>\n<ol>\n<li>you can get a token via visit the login api.</li>\n<li>most of my api need you add the jwt to request header.</li>\n</ol>\n<h1 id=\"authentication\">Authentication</h1>\n<p>JSON Web Token.</p>\n<h1 id=\"error-codes\">Error Codes</h1>\n<p>many, and I will return the Error Message.</p>\n<p><strong>Enlish is not my native language, please excuse the typing errors.</strong></p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Introduction","slug":"introduction"},{"content":"Overview","slug":"overview"},{"content":"Authentication","slug":"authentication"},{"content":"Error Codes","slug":"error-codes"}],"owner":"3083800","collectionId":"70949d57-1ab2-970c-5d64-f827a1fcc2d4","publishedId":"RVfyAp5B","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2018-02-27T05:57:22.000Z"},"item":[{"name":"users","item":[{"name":"login","id":"09fab7a3-d007-ce48-90e1-be30c1b5eadd","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\"email\":\"baobaozhou199606@gmail.com\",\"pwd\":\"123456\",\"captcha\":\"QA04XP\"}"},"url":"http://egg.raoul1996.cn/login","description":"<p>you need to add the \"captcha\" key in the payload.\nfirst, you should visit the <code>/captcha</code> api, and you will see a image, then visit the <code>/txt</code> api,\nthen copy the response body, that's the captcha value.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"70949d57-1ab2-970c-5d64-f827a1fcc2d4","id":"70949d57-1ab2-970c-5d64-f827a1fcc2d4","name":"egg-vote","type":"collection"}},"urlObject":{"protocol":"http","path":["login"],"host":["egg","raoul1996","cn"],"query":[],"variable":[]}},"response":[],"_postman_id":"09fab7a3-d007-ce48-90e1-be30c1b5eadd"},{"name":"register","id":"6d43b240-0d8c-dd8b-f0c3-324a3f2a8752","request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\"name\":\"tests\",\"email\":\"tellss@mail.com\",\"mobile\":\"15033513589\",\"pwd\":\"123456\",\"confirm\":\"123456\"}"},"url":"http://localhost:7001/register","urlObject":{"protocol":"http","port":"7001","path":["register"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"6d43b240-0d8c-dd8b-f0c3-324a3f2a8752"},{"name":"forget password ","id":"6f5ddeb6-99a0-b100-6af6-e793855bf0e0","request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\"mobile\":\"15033517219\",\"email\":\"baobaozhou199606@gmail.com\",\"captcha\":\"asda\",\"pwd\":\"123456\",\"confirm\":\"123456\"}"},"url":"http://localhost:7001/forget","description":"<p>when forget the password,you can reset password </p>\n","urlObject":{"protocol":"http","port":"7001","path":["forget"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"6f5ddeb6-99a0-b100-6af6-e793855bf0e0"},{"name":"update password","id":"20967da8-cf72-5ed4-4943-d10e5e923a18","request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\"old\":\"1234567\",\"pwd\":\"123456\",\"confirm\":\"123456\",\"captcha\":\"sdfd\"}"},"url":"http://localhost:7001/update","description":"<p>change password，the new password isn't equal the old one.</p>\n","urlObject":{"protocol":"http","port":"7001","path":["update"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"20967da8-cf72-5ed4-4943-d10e5e923a18"},{"name":"send verify email","id":"47deddc2-4683-974f-ef10-d39f9acbf148","request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\"mail\":\"tell@mail.com\"}"},"url":"http://localhost:7001/send","description":"<p>send the verify email to the user who don't active the account </p>\n","urlObject":{"protocol":"http","port":"7001","path":["send"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"47deddc2-4683-974f-ef10-d39f9acbf148"},{"name":"verify email ","id":"a3fe586f-4a64-2fff-5093-d8235a6e277c","request":{"method":"GET","header":[],"body":{"mode":"formdata","formdata":[]},"url":"http://localhost:7001/verify?active=50924ed2389383aa1c1f8771df67cff6","description":"<p>verify users email through the active code </p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"70949d57-1ab2-970c-5d64-f827a1fcc2d4","id":"70949d57-1ab2-970c-5d64-f827a1fcc2d4","name":"egg-vote","type":"collection"}},"urlObject":{"protocol":"http","port":"7001","path":["verify"],"host":["localhost"],"query":[{"key":"active","value":"50924ed2389383aa1c1f8771df67cff6"}],"variable":[]}},"response":[],"_postman_id":"a3fe586f-4a64-2fff-5093-d8235a6e277c"},{"name":"get user info","id":"939ed990-d884-8fb7-66be-edda7508ba3f","request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"formdata","formdata":[]},"url":"http://localhost:7001/user","urlObject":{"protocol":"http","port":"7001","path":["user"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"939ed990-d884-8fb7-66be-edda7508ba3f"}],"id":"cc025ffe-9ce1-d330-4b1d-3aae07f9c929","_postman_id":"cc025ffe-9ce1-d330-4b1d-3aae07f9c929","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"70949d57-1ab2-970c-5d64-f827a1fcc2d4","id":"70949d57-1ab2-970c-5d64-f827a1fcc2d4","name":"egg-vote","type":"collection"}}},{"name":"file","item":[{"name":"upload","id":"f432dbe2-0383-0946-f2ab-74d87c2d0bab","request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"}],"body":{"mode":"formdata","formdata":[{"key":"","value":null,"type":"file"},{"key":"","value":null,"type":"file","disabled":true},{"key":"","value":null,"type":"file","disabled":true}]},"url":"http://localhost:7001/file/upload","description":"<p>upload more than one files</p>\n","urlObject":{"protocol":"http","port":"7001","path":["file","upload"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"f432dbe2-0383-0946-f2ab-74d87c2d0bab"},{"name":"delete file ","id":"dfceb062-a56a-ca5e-9d60-031ba9a985d2","request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"DELETE","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\"file\":\"avatar.png\"}"},"url":"http://localhost:7001/file/del","description":"<p>delete the file which upload by users</p>\n","urlObject":{"protocol":"http","port":"7001","path":["file","del"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"dfceb062-a56a-ca5e-9d60-031ba9a985d2"},{"name":"get file info","id":"c67a144a-c6dd-49c6-96a9-a9097b5d4d2e","request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\"key\":\"4215990842917880.png\"}"},"url":"http://localhost:7001/file/info","urlObject":{"protocol":"http","port":"7001","path":["file","info"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"c67a144a-c6dd-49c6-96a9-a9097b5d4d2e"},{"name":"upload avatar","id":"0b314cf0-208e-ddeb-9e59-b347847524b9","request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"","value":null,"type":"file","disabled":true},{"key":"","value":null,"type":"file","disabled":true}]},"url":"http://localhost:7001/user/avatar","description":"<p>upload a image </p>\n","urlObject":{"protocol":"http","port":"7001","path":["user","avatar"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"0b314cf0-208e-ddeb-9e59-b347847524b9"}],"id":"cfecaad9-b668-84d6-af3d-48a8fb81f0c1","_postman_id":"cfecaad9-b668-84d6-af3d-48a8fb81f0c1","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"70949d57-1ab2-970c-5d64-f827a1fcc2d4","id":"70949d57-1ab2-970c-5d64-f827a1fcc2d4","name":"egg-vote","type":"collection"}}},{"name":"vote","item":[{"name":"get all vote list","id":"21c2f3c9-7f09-62c5-da0a-4375d0a369e6","request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"formdata","formdata":[]},"url":"http://localhost:7001/vote/list","description":"<p>get all vote list, without any auth</p>\n","urlObject":{"protocol":"http","port":"7001","path":["vote","list"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"21c2f3c9-7f09-62c5-da0a-4375d0a369e6"},{"name":"get own list","id":"15631b01-ccc5-aa97-c452-ae93d6080c54","request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"formdata","formdata":[]},"url":"http://localhost:7001/vote/own/4","description":"<p>get all the user's vote project.</p>\n","urlObject":{"protocol":"http","port":"7001","path":["vote","own","4"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"15631b01-ccc5-aa97-c452-ae93d6080c54"},{"name":"get vote msg with vote-id","id":"6a67f5f8-1d57-6361-24eb-cf61a90d9aef","request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"formdata","formdata":[]},"url":"http://localhost:7001/vote/own/4","description":"<p>get own vote with vote id </p>\n","urlObject":{"protocol":"http","port":"7001","path":["vote","own","4"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"6a67f5f8-1d57-6361-24eb-cf61a90d9aef"},{"name":"del a vote","id":"9cd805fb-6878-2cc5-90a0-364e7d80b914","request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"DELETE","header":[],"body":{"mode":"formdata","formdata":[]},"url":"http://localhost:7001/vote/del/12","urlObject":{"protocol":"http","port":"7001","path":["vote","del","12"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"9cd805fb-6878-2cc5-90a0-364e7d80b914"},{"name":"create a vote ","id":"8c2323d2-8d03-5d90-bdb2-ca70d498b5cf","request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\"title\":\"egg测试d\",\n\"password\":12351641234,\n\"type\":\"0\",\n\"max\":1,\n\"startAt\":\"2018-02-09T11:29:38.000Z\",\n\"endAt\":\"2018-03-10T11:29:41.000Z\",\n\"isPublic\":true,\n\"options\":[{\"value\":\"测试\"},{\"value\":\"测试卷\",\"key\":1519644587307}]}"},"url":"http://localhost:7001/vote/create","urlObject":{"protocol":"http","port":"7001","path":["vote","create"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"8c2323d2-8d03-5d90-bdb2-ca70d498b5cf"},{"name":"part a vote","id":"07f8e412-4032-b665-26dd-ef39b92df10e","request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\"options\":[0,2]}"},"url":"http://localhost:7001/vote/part/116","urlObject":{"protocol":"http","port":"7001","path":["vote","part","116"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"07f8e412-4032-b665-26dd-ef39b92df10e"},{"name":"get vote detail","id":"78e5108d-c627-d29f-584b-1a1d939f8be6","request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"formdata","formdata":[]},"url":"http://localhost:7001/vote/detail/116","urlObject":{"protocol":"http","port":"7001","path":["vote","detail","116"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"78e5108d-c627-d29f-584b-1a1d939f8be6"},{"name":"get vote statistic data","id":"e592025a-cea4-181d-548b-b01b04225cce","request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"formdata","formdata":[]},"url":"http://localhost:7001/vote/statistic/116","urlObject":{"protocol":"http","port":"7001","path":["vote","statistic","116"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"e592025a-cea4-181d-548b-b01b04225cce"}],"id":"32756616-e781-c6df-6470-1fe15f3d764e","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"event":[{"listen":"prerequest","script":{"id":"af236b54-42ec-4b5d-9e45-35eb0ad434f3","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"86c5c113-6354-4159-a7e1-5117a3af53ce","type":"text/javascript","exec":[""]}}],"_postman_id":"32756616-e781-c6df-6470-1fe15f3d764e","description":""},{"name":"captcha","item":[{"name":"get captcha","id":"32b06838-f901-6dbe-c9a3-95550fc83339","request":{"method":"GET","header":[],"body":{"mode":"formdata","formdata":[]},"url":"https://api.raoul1996.cn/captcha","description":"<p>this api will return a image which type is png.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"70949d57-1ab2-970c-5d64-f827a1fcc2d4","id":"70949d57-1ab2-970c-5d64-f827a1fcc2d4","name":"egg-vote","type":"collection"}},"urlObject":{"protocol":"https","path":["captcha"],"host":["api","raoul1996","cn"],"query":[],"variable":[]}},"response":[],"_postman_id":"32b06838-f901-6dbe-c9a3-95550fc83339"},{"name":"get capthca conent.","id":"76e374e1-c869-8652-8eb3-8708e5e35fb4","request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[]},"url":"http://localhost:7001/txt","description":"<p>get the content of the captcha image which created by the /captcha api</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"70949d57-1ab2-970c-5d64-f827a1fcc2d4","id":"70949d57-1ab2-970c-5d64-f827a1fcc2d4","name":"egg-vote","type":"collection"}},"urlObject":{"protocol":"http","port":"7001","path":["txt"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"76e374e1-c869-8652-8eb3-8708e5e35fb4"}],"id":"fed7dae7-1a14-8c97-8c35-483fbc46e6c8","_postman_id":"fed7dae7-1a14-8c97-8c35-483fbc46e6c8","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"70949d57-1ab2-970c-5d64-f827a1fcc2d4","id":"70949d57-1ab2-970c-5d64-f827a1fcc2d4","name":"egg-vote","type":"collection"}}},{"name":"rest-topic","id":"eb9c4716-e2b7-54df-564a-d3edd02a4c68","request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"formdata","formdata":[]},"url":"http://egg.raoul1996.cn/api/v2/topics","description":"<p>this api is the test from eggjs.org</p>\n","urlObject":{"protocol":"http","path":["api","v2","topics"],"host":["egg","raoul1996","cn"],"query":[],"variable":[]}},"response":[],"_postman_id":"eb9c4716-e2b7-54df-564a-d3edd02a4c68"},{"name":"get article list","id":"cb7a376e-fc4b-f833-6534-a2a343401c97","request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"formdata","formdata":[]},"url":"http://egg.raoul1996.cn/api/article/list","description":"<p>use the mock data</p>\n","urlObject":{"protocol":"http","path":["api","article","list"],"host":["egg","raoul1996","cn"],"query":[],"variable":[]}},"response":[],"_postman_id":"cb7a376e-fc4b-f833-6534-a2a343401c97"},{"name":"redis test","id":"cbac5605-cb1e-e280-97d0-360f5f70629a","request":{"method":"GET","header":[],"body":{"mode":"formdata","formdata":[]},"url":"http://localhost:7001/redis","description":"<p>use redis with egg-session plugin\nonly to test the work status of redis database</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"70949d57-1ab2-970c-5d64-f827a1fcc2d4","id":"70949d57-1ab2-970c-5d64-f827a1fcc2d4","name":"egg-vote","type":"collection"}},"urlObject":{"protocol":"http","port":"7001","path":["redis"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"cbac5605-cb1e-e280-97d0-360f5f70629a"},{"name":"reader xlsx file","id":"a2558917-1466-cd17-c3eb-388d56e2ac88","request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"","value":null,"type":"file"}]},"url":"http://localhost:7001/xlsx","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"70949d57-1ab2-970c-5d64-f827a1fcc2d4","id":"70949d57-1ab2-970c-5d64-f827a1fcc2d4","name":"egg-vote","type":"collection"}},"urlObject":{"protocol":"http","port":"7001","path":["xlsx"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"a2558917-1466-cd17-c3eb-388d56e2ac88"}],"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]}},"event":[{"listen":"prerequest","script":{"id":"192c164a-cc6d-431c-a014-23f9549f853a","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"57999940-4097-42cc-890a-c0ff315e9b35","type":"text/javascript","exec":[""]}}]}