{"info":{"_postman_id":"4317cb06-c7d9-455b-a1d0-9656d2c2beca","name":"gg- api","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"5567026","collectionId":"4317cb06-c7d9-455b-a1d0-9656d2c2beca","publishedId":"RWgp2fKK","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2018-10-10T04:23:46.000Z"},"item":[{"name":"polls","item":[{"name":"Get Poll","id":"6e20622a-c5cc-4e77-b8a3-d86e324016dd","request":{"method":"GET","header":[{"key":"jwt","type":"text","value":"{{jwt-token}}"},{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":"{{gg-api-url}}/v1/poll/{{id}}","description":"<p>This request retrieves a poll, it's options, and any results on those options.</p>\n","urlObject":{"path":["v1","poll","{{id}}"],"host":["{{gg-api-url}}"],"query":[],"variable":[]}},"response":[{"id":"eff915af-bf03-4394-b94a-c342feae19b5","name":"Get Poll","originalRequest":{"method":"GET","header":[{"key":"jwt","value":"{{jwt-token}}","type":"text"},{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"options\":[]\n}"},"url":"{{gg-api-url}}/v1/poll/{{id}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"id\": \"c6c92d3b-372c-41b3-b146-e3ee04007f32\",\n    \"subject\": \"What movie to watch?\",\n    \"options\": {\n        \"Hunger Games\": 0,\n        \"Matrix\": 0,\n        \"Fight Club\": 0\n    },\n    \"multi_vote\": false\n}"}],"_postman_id":"6e20622a-c5cc-4e77-b8a3-d86e324016dd"},{"name":"Create Poll","id":"07d691f7-c1cb-4bbd-8504-3460fca6710b","request":{"method":"POST","header":[{"key":"jwt","value":"{{jwt-token}}","type":"text"},{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"subject\":\"What movie to watch?\",\n\t\"options\": [\n\t\t\"Hunger Games\",\n\t\t\"Matrix\",\n\t\t\"Fight Club\"\n\t\t],\n\t\"multi_vote\": false\n}"},"url":"{{gg-api-url}}/v1/poll","description":"<p>This request creates a poll. Decoding the JWT, results in a user ID, we map that to a users channel / name using strims api. If the id already does not have an active poll, it will create a new poll tied to the channel. This tie in is for the case to show it on that users channel automatically, but a link will also be returned for other clients to get the poll / poll results / vote in the poll.</p>\n","urlObject":{"path":["v1","poll"],"host":["{{gg-api-url}}"],"query":[],"variable":[]}},"response":[{"id":"03a814f7-a82e-40a7-b864-bcdb70688fd1","name":"Multi Vote","originalRequest":{"method":"POST","header":[{"key":"jwt","value":"{{jwt-token}}","type":"text"},{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"subject\":\"What movie to watch?\",\n\t\"options\": [\n\t\t\"Hunger Games\",\n\t\t\"Matrix\",\n\t\t\"Fight Club\"\n\t\t],\n\t\"multi_vote\": true\n}"},"url":"{{gg-api-url}}/v1/poll"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"id\": \"c6c92d3b-372c-41b3-b146-e3ee04007f32\",\n    \"subject\": \"What movie to watch?\",\n    \"options\": {\n        \"Hunger Games\": 0,\n        \"Matrix\": 0,\n        \"Fight Club\": 0\n    },\n    \"multi-vote\": true\n}"},{"id":"dcc7caae-aac3-4224-8abf-90ff4416aec6","name":"Single Vote","originalRequest":{"method":"POST","header":[{"key":"jwt","value":"{{jwt-token}}","type":"text"},{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"subject\":\"What movie to watch?\",\n\t\"options\": [\n\t\t\"Hunger Games\",\n\t\t\"Matrix\",\n\t\t\"Fight Club\"\n\t\t],\n\t\"multi_vote\": false\n}"},"url":"{{gg-api-url}}/v1/poll"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"id\": \"c6c92d3b-372c-41b3-b146-e3ee04007f32\",\n    \"subject\": \"What movie to watch?\",\n    \"options\": {\n        \"Hunger Games\": 0,\n        \"Matrix\": 0,\n        \"Fight Club\": 0\n    },\n    \"multi_vote\": false\n}"}],"_postman_id":"07d691f7-c1cb-4bbd-8504-3460fca6710b"},{"name":"Delete Poll","id":"8317e474-3a15-4337-9968-c472b58222c0","request":{"method":"DELETE","header":[{"key":"jwt","value":"{{jwt-token}}","type":"text"}],"body":{"mode":"formdata","formdata":[]},"url":"{{gg-api-url}}/v1/poll/{{id}}","description":"<p>This request deletes a poll. Decoding the JWT, results in a user ID, we map this plus the poll id provided by the user to determine if the user is capable of deleting the poll.</p>\n","urlObject":{"path":["v1","poll","{{id}}"],"host":["{{gg-api-url}}"],"query":[],"variable":[]}},"response":[{"id":"cfc57527-9f7e-4f74-9698-c47e6c3dad58","name":"Delete Poll","originalRequest":{"method":"DELETE","header":[{"key":"jwt","value":"{{jwt-token}}","type":"text"}],"body":{"mode":"formdata","formdata":[]},"url":"{{gg-api-url}}/v1/poll/1234-5678-C345-O934"},"status":"No Content","code":204,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null}],"_postman_id":"8317e474-3a15-4337-9968-c472b58222c0"},{"name":"Vote on a Poll","id":"68e808f0-af3c-4b13-ae36-9204a70564cd","request":{"method":"POST","header":[{"key":"jwt","type":"text","value":"{{jwt-token}}"},{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"options\":[]\n}"},"url":"{{gg-api-url}}/v1/poll/{{id}}/vote","description":"<p>This request votes on a poll. Decoding the JWT, results in a user ID, we map this plus the poll id provided by the user to determine if the user is capable of voting in the poll. A user may only vote once, but depending on the poll potentially vote for multiple options.</p>\n","urlObject":{"path":["v1","poll","{{id}}","vote"],"host":["{{gg-api-url}}"],"query":[],"variable":[]}},"response":[{"id":"05a73d13-d128-4cd9-a150-ad6768c1b9e5","name":"Single Vote","originalRequest":{"method":"POST","header":[{"key":"jwt","value":"{{jwt-token}}","type":"text"},{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"options\":[\"Matrix\"]\n}"},"url":"{{gg-api-url}}/v1/poll/{{id}}/vote"},"status":"Accepted","code":202,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"id\": \"c6c92d3b-372c-41b3-b146-e3ee04007f32\",\n    \"subject\": \"What movie to watch?\",\n    \"options\": {\n        \"Hunger Games\": 0,\n        \"Matrix\": 1,\n        \"Fight Club\": 0\n    },\n    \"multi_vote\": false\n}"},{"id":"4b0cf63f-791f-40ca-8698-0205d2f8f47a","name":"Multi Vote","originalRequest":{"method":"POST","header":[{"key":"jwt","value":"{{jwt-token}}","type":"text"},{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"options\":[\"Matrix\", \"Hunger Games\"]\n}"},"url":"{{gg-api-url}}/v1/poll/{{id}}/vote"},"status":"Accepted","code":202,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"id\": \"c6c92d3b-372c-41b3-b146-e3ee04007f32\",\n    \"subject\": \"What movie to watch?\",\n    \"options\": {\n        \"Hunger Games\": 1,\n        \"Matrix\": 1,\n        \"Fight Club\": 0\n    },\n    \"multi_vote\": false\n}"}],"_postman_id":"68e808f0-af3c-4b13-ae36-9204a70564cd"}],"id":"8e4a86f2-3c3e-49c3-9260-124394460dfb","_postman_id":"8e4a86f2-3c3e-49c3-9260-124394460dfb","description":""}]}