{"action":"created","issue":{"url":"https://api.github.com/repos/EddyVerbruggen/nativescript-plugin-firebase/issues/313","repository_url":"https://api.github.com/repos/EddyVerbruggen/nativescript-plugin-firebase","labels_url":"https://api.github.com/repos/EddyVerbruggen/nativescript-plugin-firebase/issues/313/labels{/name}","comments_url":"https://api.github.com/repos/EddyVerbruggen/nativescript-plugin-firebase/issues/313/comments","events_url":"https://api.github.com/repos/EddyVerbruggen/nativescript-plugin-firebase/issues/313/events","html_url":"https://github.com/EddyVerbruggen/nativescript-plugin-firebase/issues/313","id":214462826,"number":313,"title":"Atomic multi-location update","user":{"login":"lorcanfurey","id":4323447,"avatar_url":"https://avatars1.githubusercontent.com/u/4323447?v=3","gravatar_id":"","url":"https://api.github.com/users/lorcanfurey","html_url":"https://github.com/lorcanfurey","followers_url":"https://api.github.com/users/lorcanfurey/followers","following_url":"https://api.github.com/users/lorcanfurey/following{/other_user}","gists_url":"https://api.github.com/users/lorcanfurey/gists{/gist_id}","starred_url":"https://api.github.com/users/lorcanfurey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorcanfurey/subscriptions","organizations_url":"https://api.github.com/users/lorcanfurey/orgs","repos_url":"https://api.github.com/users/lorcanfurey/repos","events_url":"https://api.github.com/users/lorcanfurey/events{/privacy}","received_events_url":"https://api.github.com/users/lorcanfurey/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-03-15T17:14:13Z","updated_at":"2017-06-20T12:46:38Z","closed_at":"2017-06-20T12:46:38Z","body":"Hi! Would it be difficult to add atomic multi-location updates as shown in this [Firebase Blog post](https://firebase.googleblog.com/2015/09/introducing-multi-location-updates-and_86.html):\r\n\r\n```\r\nvar ref = new Firebase(\"https://<YOUR-FIREBASE-APP>.firebaseio.com\");\r\n// Generate a new push ID for the new post\r\nvar newPostRef = ref.child(\"posts\").push();\r\nvar newPostKey = newPostRef.key();\r\n// Create the data we want to update\r\nvar updatedUserData = {};\r\nupdatedUserData[\"user/posts/\" + newPostKey] = true;\r\nupdatedUserData[\"posts/\" + newPostKey] = {\r\n  title: \"New Post\",\r\n  content: \"Here is my new post!\"\r\n};\r\n// Do a deep-path update\r\nref.update(updatedUserData, function(error) {\r\n  if (error) {\r\n    console.log(\"Error updating data:\", error);\r\n  }\r\n});\r\n```\r\n\r\nI can try my hand on a pull request (tbh wary, first-ever PR if so) but:\r\n1) should this plugin's firebase.update() be edited, or a separate method be instead stubbed out for multi-location updates (different parameter types in firebase.d.ts); and\r\n2) I'm not sure how to work/test out the iOS counterpart; I'm not that familiar with Obj-C"},"comment":{"url":"https://api.github.com/repos/EddyVerbruggen/nativescript-plugin-firebase/issues/comments/309741964","html_url":"https://github.com/EddyVerbruggen/nativescript-plugin-firebase/issues/313#issuecomment-309741964","issue_url":"https://api.github.com/repos/EddyVerbruggen/nativescript-plugin-firebase/issues/313","id":309741964,"user":{"login":"EddyVerbruggen","id":1426370,"avatar_url":"https://avatars2.githubusercontent.com/u/1426370?v=3","gravatar_id":"","url":"https://api.github.com/users/EddyVerbruggen","html_url":"https://github.com/EddyVerbruggen","followers_url":"https://api.github.com/users/EddyVerbruggen/followers","following_url":"https://api.github.com/users/EddyVerbruggen/following{/other_user}","gists_url":"https://api.github.com/users/EddyVerbruggen/gists{/gist_id}","starred_url":"https://api.github.com/users/EddyVerbruggen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EddyVerbruggen/subscriptions","organizations_url":"https://api.github.com/users/EddyVerbruggen/orgs","repos_url":"https://api.github.com/users/EddyVerbruggen/repos","events_url":"https://api.github.com/users/EddyVerbruggen/events{/privacy}","received_events_url":"https://api.github.com/users/EddyVerbruggen/received_events","type":"User","site_admin":false},"created_at":"2017-06-20T12:46:38Z","updated_at":"2017-06-20T12:46:38Z","body":"Thanks for this guys. If anyone is up for an update of the plugin docs I'd be happy to merge a PR."}}
{"actor":{"display_login":"EddyVerbruggen"}}