{"action":"created","issue":{"url":"https://api.github.com/repos/remotestorage/remotestorage.js/issues/834","labels_url":"https://api.github.com/repos/remotestorage/remotestorage.js/issues/834/labels{/name}","comments_url":"https://api.github.com/repos/remotestorage/remotestorage.js/issues/834/comments","events_url":"https://api.github.com/repos/remotestorage/remotestorage.js/issues/834/events","html_url":"https://github.com/remotestorage/remotestorage.js/issues/834","id":56855036,"number":834,"title":"Add function for updating objects to BaseClient","user":{"login":"skddc","id":842,"avatar_url":"https://avatars.githubusercontent.com/u/842?v=3","gravatar_id":"","url":"https://api.github.com/users/skddc","html_url":"https://github.com/skddc","followers_url":"https://api.github.com/users/skddc/followers","following_url":"https://api.github.com/users/skddc/following{/other_user}","gists_url":"https://api.github.com/users/skddc/gists{/gist_id}","starred_url":"https://api.github.com/users/skddc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skddc/subscriptions","organizations_url":"https://api.github.com/users/skddc/orgs","repos_url":"https://api.github.com/users/skddc/repos","events_url":"https://api.github.com/users/skddc/events{/privacy}","received_events_url":"https://api.github.com/users/skddc/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/remotestorage/remotestorage.js/labels/help%20wanted","name":"help wanted","color":"bfe5bf"},{"url":"https://api.github.com/repos/remotestorage/remotestorage.js/labels/improvement","name":"improvement","color":"02e10c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-02-06T19:18:20Z","updated_at":"2015-07-03T13:39:48Z","closed_at":null,"body":"The app we're working on right now saves different parts of an object from different places. It would be extremely convenient to have a function on the BaseClient that supports updating single properties on existing objects by wrapping `storeObject` and `getObject` in one convenient helper function.\r\n\r\nAPI could look like this e.g.:\r\n\r\n```js\r\nclient.updateObject(path, {keyToUpdateOne: 'foo', keyToUpdateTwo: 'bar'});\r\n```\r\n\r\nThe function would then fetch the object using getObject, update only the keys from the second argument and validate and store again via `storeObject`.\r\n\r\nIt's actually quite simple, so if someone wants to take a stab at this, go ahead! Don't be afraid of the test suite (if that's a reason not to try), we can help you with that later. ;)"},"comment":{"url":"https://api.github.com/repos/remotestorage/remotestorage.js/issues/comments/118355242","html_url":"https://github.com/remotestorage/remotestorage.js/issues/834#issuecomment-118355242","issue_url":"https://api.github.com/repos/remotestorage/remotestorage.js/issues/834","id":118355242,"user":{"login":"skddc","id":842,"avatar_url":"https://avatars.githubusercontent.com/u/842?v=3","gravatar_id":"","url":"https://api.github.com/users/skddc","html_url":"https://github.com/skddc","followers_url":"https://api.github.com/users/skddc/followers","following_url":"https://api.github.com/users/skddc/following{/other_user}","gists_url":"https://api.github.com/users/skddc/gists{/gist_id}","starred_url":"https://api.github.com/users/skddc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skddc/subscriptions","organizations_url":"https://api.github.com/users/skddc/orgs","repos_url":"https://api.github.com/users/skddc/repos","events_url":"https://api.github.com/users/skddc/events{/privacy}","received_events_url":"https://api.github.com/users/skddc/received_events","type":"User","site_admin":false},"created_at":"2015-07-03T13:39:48Z","updated_at":"2015-07-03T13:39:48Z","body":"Thanks.\r\n\r\nI don't understand the conflict event part. If you expect people to use the app at the same time from different devices, then this function doesn't make any difference in you having to catch conflicts in any case I believe.\r\n\r\nThe overlapping requests however seem to be a real issue, as our queue is rather simple and we cannot easily add simple locking, like you said."}}