{"info":{"_postman_id":"95ddf83c-a283-4547-a720-cff4e7f738b9","name":"Messaging","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"6128785","collectionId":"95ddf83c-a283-4547-a720-cff4e7f738b9","publishedId":"SztG3RNu","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2020-06-02T19:14:46.000Z"},"item":[{"name":"messages","item":[{"name":"send a message","id":"14a6090d-b813-4167-af5b-ec7e06938f22","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"receiver\":\"lasttestuser\",\n\t\"subject\":\"test111\",\n\t\"message\":\"test2222\"\n}","options":{"raw":{"language":"json"}}},"url":"https://herolo.duckdns.org/users/testuser/message","description":"<p>/users/&lt;username&gt;/message</p>\n<p>headers</p>\n<ul>\n<li><b>Authorization</b>\n  the Bearer for the user</li>\n</ul>\n","urlObject":{"protocol":"https","path":["users","testuser","message"],"host":["herolo","duckdns","org"],"query":[],"variable":[]}},"response":[],"_postman_id":"14a6090d-b813-4167-af5b-ec7e06938f22"},{"name":"get received messages per user","id":"4fb2754a-488b-4cbe-a92b-a290aa969a8e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://herolo.duckdns.org/users/testuser/messages?unread=true&per_page=1&page=1","description":"<p>params </p>\n<ul>\n<li><b>unread</b><br />  if true - return only unread messages\n  if flase -  return only messages that have been read\n  if undefined return all messages</li>\n</ul>\n<p>headers</p>\n<ul>\n<li><b>Authorization</b>\n  the Bearer for the user</li>\n</ul>\n","urlObject":{"protocol":"https","path":["users","testuser","messages"],"host":["herolo","duckdns","org"],"query":[{"key":"unread","value":"true"},{"key":"per_page","value":"1"},{"key":"page","value":"1"}],"variable":[]}},"response":[],"_postman_id":"4fb2754a-488b-4cbe-a92b-a290aa969a8e"},{"name":"read a message","id":"30f048cc-fcaa-4e67-adc7-a79f15ca634b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n\t\"read\":true\n}","options":{"raw":{"language":"json"}}},"url":"https://herolo.duckdns.org/users/testuser/messages/3","description":"<p>body</p>\n<ul>\n<li><b>read</b>\n  read = true -&gt; mark message as read\n  read = false -&gt; mark a message as unread</li>\n</ul>\n<p>headers</p>\n<ul>\n<li><b>Authorization</b>\n  the Bearer for the user</li>\n</ul>\n","urlObject":{"protocol":"https","path":["users","testuser","messages","3"],"host":["herolo","duckdns","org"],"query":[],"variable":[]}},"response":[],"_postman_id":"30f048cc-fcaa-4e67-adc7-a79f15ca634b"},{"name":"delete a message","id":"43e01981-e272-4e0f-a4ad-ec5a716e13b2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"DELETE","header":[],"url":"https://herolo.duckdns.org/users/testuser/messages/3","description":"<p>headers</p>\n<ul>\n<li><b>Authorization</b>\n  the Bearer for the user</li>\n</ul>\n","urlObject":{"protocol":"https","path":["users","testuser","messages","3"],"host":["herolo","duckdns","org"],"query":[],"variable":[]}},"response":[],"_postman_id":"43e01981-e272-4e0f-a4ad-ec5a716e13b2"}],"id":"fc36019e-b162-464b-8fc4-0cdca76b89c7","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"event":[{"listen":"prerequest","script":{"id":"bf05f726-7cf7-4287-9015-ffc909fbf588","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"6b774aec-808b-4cdb-8f0b-aa8afc16a0e4","type":"text/javascript","exec":[""]}}],"_postman_id":"fc36019e-b162-464b-8fc4-0cdca76b89c7","description":""},{"name":"users","item":[{"name":"create a token for the user","event":[{"listen":"test","script":{"id":"4922fadf-35a2-464b-9801-8a7a8e3f339b","exec":["pm.test(\"Your test name\", function () {\r","    var jsonData = pm.response.json();\r","   \r","\r","    \r","pm.environment.set(\"token\", \"jsonData.token\");\r","});"],"type":"text/javascript"}}],"id":"9dc434e2-47ff-4c85-b69d-9a25a4d67928","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"password\":\"123456\"\n}","options":{"raw":{"language":"json"}}},"url":"https://herolo.duckdns.org/users/testuser/token","description":"<p>/user/&lt;username&gt;/token</p>\n<p>body</p>\n<ul>\n<li><b>password</b>\n   the user passwowrd</li>\n</ul>\n","urlObject":{"protocol":"https","path":["users","testuser","token"],"host":["herolo","duckdns","org"],"query":[],"variable":[]}},"response":[],"_postman_id":"9dc434e2-47ff-4c85-b69d-9a25a4d67928"},{"name":"register a user","id":"c814b6eb-5ba4-4ad6-bb8c-c1b2604db506","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"username\":\"testuser\",\n\t\"email\":\"ee@gmail.com\",\n\t\"password\":\"123456\"\n}","options":{"raw":{"language":"json"}}},"url":"https://herolo.duckdns.org/users","description":"<p>/user</p>\n<p>body</p>\n<ul>\n<li><b>username</b></li>\n<li><b>email</b></li>\n<li><b>password</b></li>\n</ul>\n","urlObject":{"protocol":"https","path":["users"],"host":["herolo","duckdns","org"],"query":[],"variable":[]}},"response":[],"_postman_id":"c814b6eb-5ba4-4ad6-bb8c-c1b2604db506"}],"id":"c7201613-f150-4157-8094-8e7c5b9554cf","_postman_id":"c7201613-f150-4157-8094-8e7c5b9554cf","description":""}]}