{"action":"created","issue":{"url":"https://api.github.com/repos/Kinto/kinto.js/issues/542","repository_url":"https://api.github.com/repos/Kinto/kinto.js","labels_url":"https://api.github.com/repos/Kinto/kinto.js/issues/542/labels{/name}","comments_url":"https://api.github.com/repos/Kinto/kinto.js/issues/542/comments","events_url":"https://api.github.com/repos/Kinto/kinto.js/issues/542/events","html_url":"https://github.com/Kinto/kinto.js/issues/542","id":176177565,"number":542,"title":"What to do after received data from Websocket?","user":{"login":"ptgamr","id":1619740,"avatar_url":"https://avatars.githubusercontent.com/u/1619740?v=3","gravatar_id":"","url":"https://api.github.com/users/ptgamr","html_url":"https://github.com/ptgamr","followers_url":"https://api.github.com/users/ptgamr/followers","following_url":"https://api.github.com/users/ptgamr/following{/other_user}","gists_url":"https://api.github.com/users/ptgamr/gists{/gist_id}","starred_url":"https://api.github.com/users/ptgamr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptgamr/subscriptions","organizations_url":"https://api.github.com/users/ptgamr/orgs","repos_url":"https://api.github.com/users/ptgamr/repos","events_url":"https://api.github.com/users/ptgamr/events{/privacy}","received_events_url":"https://api.github.com/users/ptgamr/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Kinto/kinto.js/labels/documentation","name":"documentation","color":"207de5"},{"url":"https://api.github.com/repos/Kinto/kinto.js/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-10T12:36:46Z","updated_at":"2016-09-12T08:53:44Z","closed_at":null,"body":"What should we do after received the changes from Websocket? Trigger `collection.sync` would be inefficient for me (data is already available in the websocket message)\r\n\r\n```\r\n//sample repsonse\r\n{\r\n  channel: \"94b660c6-68f3-83c4-97fa-8e8ac4715204-kinto_demo_calendar-record\",\r\n  data: \"the data that changes\",\r\n  event: \"update\"\r\n}\r\n```\r\n\r\nI think we could create/update/delete record manually. But how to best update the `lastModified` time is still mysterious."},"comment":{"url":"https://api.github.com/repos/Kinto/kinto.js/issues/comments/246286924","html_url":"https://github.com/Kinto/kinto.js/issues/542#issuecomment-246286924","issue_url":"https://api.github.com/repos/Kinto/kinto.js/issues/542","id":246286924,"user":{"login":"ptgamr","id":1619740,"avatar_url":"https://avatars.githubusercontent.com/u/1619740?v=3","gravatar_id":"","url":"https://api.github.com/users/ptgamr","html_url":"https://github.com/ptgamr","followers_url":"https://api.github.com/users/ptgamr/followers","following_url":"https://api.github.com/users/ptgamr/following{/other_user}","gists_url":"https://api.github.com/users/ptgamr/gists{/gist_id}","starred_url":"https://api.github.com/users/ptgamr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptgamr/subscriptions","organizations_url":"https://api.github.com/users/ptgamr/orgs","repos_url":"https://api.github.com/users/ptgamr/repos","events_url":"https://api.github.com/users/ptgamr/events{/privacy}","received_events_url":"https://api.github.com/users/ptgamr/received_events","type":"User","site_admin":false},"created_at":"2016-09-12T08:53:44Z","updated_at":"2016-09-12T08:53:44Z","body":"Thanks @leplatrem for the detailed response. I'll try to do what you suggested.\r\n\r\nHowever, I think it would be perfect if the kintojs client can just provide a simple API to work with for eg. `.syncIncomming(dataFromWebsocket, strategy)` which will return a `SyncResultObject`"}}
{"actor":{"display_login":"ptgamr"}}