{"action":"created","issue":{"url":"https://api.github.com/repos/electron-userland/electron-builder/issues/972","repository_url":"https://api.github.com/repos/electron-userland/electron-builder","labels_url":"https://api.github.com/repos/electron-userland/electron-builder/issues/972/labels{/name}","comments_url":"https://api.github.com/repos/electron-userland/electron-builder/issues/972/comments","events_url":"https://api.github.com/repos/electron-userland/electron-builder/issues/972/events","html_url":"https://github.com/electron-userland/electron-builder/issues/972","id":193422582,"number":972,"title":"Request for NSIS Updater API to Start Downloading","user":{"login":"evshiron","id":8800643,"avatar_url":"https://avatars.githubusercontent.com/u/8800643?v=3","gravatar_id":"","url":"https://api.github.com/users/evshiron","html_url":"https://github.com/evshiron","followers_url":"https://api.github.com/users/evshiron/followers","following_url":"https://api.github.com/users/evshiron/following{/other_user}","gists_url":"https://api.github.com/users/evshiron/gists{/gist_id}","starred_url":"https://api.github.com/users/evshiron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evshiron/subscriptions","organizations_url":"https://api.github.com/users/evshiron/orgs","repos_url":"https://api.github.com/users/evshiron/repos","events_url":"https://api.github.com/users/evshiron/events{/privacy}","received_events_url":"https://api.github.com/users/evshiron/received_events","type":"User","site_admin":false},"labels":[{"id":214243369,"url":"https://api.github.com/repos/electron-userland/electron-builder/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":214243370,"url":"https://api.github.com/repos/electron-userland/electron-builder/labels/help%20wanted","name":"help wanted","color":"159818","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-12-05T06:40:29Z","updated_at":"2016-12-08T11:20:56Z","closed_at":null,"body":"<!-- Which version of electron-builder are you using? -->\r\n* **Version**: 10.5.0\r\n\r\n<!-- What target are you building for? -->\r\n* **Target**: win32 ia32\r\n\r\n<!-- Enter your issue details below this comment. -->\r\nGreetings,\r\n\r\nI really appreciate it if there is an API to start downloading updates rather than the current all-in-one check-and-download `autoUpdater.checkForUpdates` function.\r\n\r\nWhat I want is something like this:\r\n\r\n```javascript\r\nautoUpdater.autoDownload = false;\r\nautoUpdater.on('update-available', () => {\r\n    if(confirm('New version is available, download now?')) {\r\n        autoUpdater.on('update-downloaded', () => {\r\n            if(confirm('New version is downloaded, quit and install now?')) {\r\n                autoUpdater.quitAndInstall();\r\n            }\r\n        });\r\n        autoUpdater.download();\r\n    }\r\n});\r\nautoUpdater.checkForUpdates();\r\n```\r\n\r\nI can do and PR it but I want to know if it comforts you so feel free to discuss. Thanks.\r\n"},"comment":{"url":"https://api.github.com/repos/electron-userland/electron-builder/issues/comments/265717329","html_url":"https://github.com/electron-userland/electron-builder/issues/972#issuecomment-265717329","issue_url":"https://api.github.com/repos/electron-userland/electron-builder/issues/972","id":265717329,"user":{"login":"develar","id":350686,"avatar_url":"https://avatars.githubusercontent.com/u/350686?v=3","gravatar_id":"","url":"https://api.github.com/users/develar","html_url":"https://github.com/develar","followers_url":"https://api.github.com/users/develar/followers","following_url":"https://api.github.com/users/develar/following{/other_user}","gists_url":"https://api.github.com/users/develar/gists{/gist_id}","starred_url":"https://api.github.com/users/develar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/develar/subscriptions","organizations_url":"https://api.github.com/users/develar/orgs","repos_url":"https://api.github.com/users/develar/repos","events_url":"https://api.github.com/users/develar/events{/privacy}","received_events_url":"https://api.github.com/users/develar/received_events","type":"User","site_admin":false},"created_at":"2016-12-08T11:20:56Z","updated_at":"2016-12-08T11:20:56Z","body":"Please see test \"file url generic\" https://github.com/electron-userland/electron-builder/blob/master/test/src/nsisUpdaterTest.ts#L77\r\n\r\nTest plan:\r\n* should be not event \"update-downloaded\"\r\n* updateCheckResult.downloadPromise should be null"}}
{"actor":{"display_login":"develar"}}