{"action":"created","issue":{"url":"https://api.github.com/repos/TristanMarion/Jerrol-API/issues/22","repository_url":"https://api.github.com/repos/TristanMarion/Jerrol-API","labels_url":"https://api.github.com/repos/TristanMarion/Jerrol-API/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/TristanMarion/Jerrol-API/issues/22/comments","events_url":"https://api.github.com/repos/TristanMarion/Jerrol-API/issues/22/events","html_url":"https://github.com/TristanMarion/Jerrol-API/issues/22","id":371437794,"node_id":"MDU6SXNzdWUzNzE0Mzc3OTQ=","number":22,"title":"[Proposal] Refacto of alerts/notifications system","user":{"login":"TristanMarion","id":15214116,"node_id":"MDQ6VXNlcjE1MjE0MTE2","avatar_url":"https://avatars0.githubusercontent.com/u/15214116?v=4","gravatar_id":"","url":"https://api.github.com/users/TristanMarion","html_url":"https://github.com/TristanMarion","followers_url":"https://api.github.com/users/TristanMarion/followers","following_url":"https://api.github.com/users/TristanMarion/following{/other_user}","gists_url":"https://api.github.com/users/TristanMarion/gists{/gist_id}","starred_url":"https://api.github.com/users/TristanMarion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TristanMarion/subscriptions","organizations_url":"https://api.github.com/users/TristanMarion/orgs","repos_url":"https://api.github.com/users/TristanMarion/repos","events_url":"https://api.github.com/users/TristanMarion/events{/privacy}","received_events_url":"https://api.github.com/users/TristanMarion/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-10-18T09:23:52Z","updated_at":"2018-10-18T09:38:42Z","closed_at":null,"author_association":"OWNER","body":"What about a new system for alerts and notifications like the ones existing in development for logging :\r\n- `INFO`: for current notifications (light has been switched on/off)\r\n- `WARN` : for current alerts (needs water or too much light)\r\n- `ERROR` : TBD (maybe a device crash, or something really bad (0% humidity?))\r\n\r\nThe messages would have this data schema : \r\n```JSON\r\n{\r\n  \"deviceId\": \"deviceId\",\r\n  \"type\": \"INFO\",\r\n  \"code\": \"LIGHT\",\r\n  \"message\": \"Light has been turned on\"\r\n}\r\n```\r\n\r\nAnd it would works like for notifications and alerts : a `GET` route to get device messages, a `POST` route to create messages. Same system than the existing one for the dates, using the timestamp stored in Mongo ID."},"comment":{"url":"https://api.github.com/repos/TristanMarion/Jerrol-API/issues/comments/430943535","html_url":"https://github.com/TristanMarion/Jerrol-API/issues/22#issuecomment-430943535","issue_url":"https://api.github.com/repos/TristanMarion/Jerrol-API/issues/22","id":430943535,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDk0MzUzNQ==","user":{"login":"TristanMarion","id":15214116,"node_id":"MDQ6VXNlcjE1MjE0MTE2","avatar_url":"https://avatars0.githubusercontent.com/u/15214116?v=4","gravatar_id":"","url":"https://api.github.com/users/TristanMarion","html_url":"https://github.com/TristanMarion","followers_url":"https://api.github.com/users/TristanMarion/followers","following_url":"https://api.github.com/users/TristanMarion/following{/other_user}","gists_url":"https://api.github.com/users/TristanMarion/gists{/gist_id}","starred_url":"https://api.github.com/users/TristanMarion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TristanMarion/subscriptions","organizations_url":"https://api.github.com/users/TristanMarion/orgs","repos_url":"https://api.github.com/users/TristanMarion/repos","events_url":"https://api.github.com/users/TristanMarion/events{/privacy}","received_events_url":"https://api.github.com/users/TristanMarion/received_events","type":"User","site_admin":false},"created_at":"2018-10-18T09:38:42Z","updated_at":"2018-10-18T09:38:42Z","author_association":"OWNER","body":"You would like to concatenate everything in a single field ?\r\nLGTM and it well be translating compliant for future versions of the app !"}}
{"actor":{"display_login":"TristanMarion"}}