Standardize auto-updater.md

This commit is contained in:
Jessica Lord 2015-08-19 18:55:11 +02:00
parent 714745cdd7
commit 454413f69a

View file

@ -1,4 +1,4 @@
# auto-updater # autoUpdater
**This module has only been implemented for OS X.** **This module has only been implemented for OS X.**
@ -98,27 +98,35 @@ appropriate format.
`pub_date` (if present) must be formatted according to ISO 8601. `pub_date` (if present) must be formatted according to ISO 8601.
## Event: error ## Events
The `autoUpdater` object emits the following events:
### Event: 'error'
Returns:
* `event` Event * `event` Event
* `message` String * `message` String
Emitted when there is an error while updating. Emitted when there is an error while updating.
## Event: checking-for-update ### Event: 'checking-for-update'
Emitted when checking if an update has started. Emitted when checking if an update has started.
## Event: update-available ### Event: 'update-available'
Emitted when there is an available update. The update is downloaded Emitted when there is an available update. The update is downloaded
automatically. automatically.
## Event: update-not-available ### Event: 'update-not-available'
Emitted when there is no available update. Emitted when there is no available update.
## Event: update-downloaded ### Event: 'update-downloaded'
Returns:
* `event` Event * `event` Event
* `releaseNotes` String * `releaseNotes` String
@ -130,14 +138,18 @@ Emitted when there is no available update.
Emitted when an update has been downloaded. Calling `quitAndUpdate()` will restart Emitted when an update has been downloaded. Calling `quitAndUpdate()` will restart
the application and install the update. the application and install the update.
## autoUpdater.setFeedUrl(url) ## Methods
The `autoUpdater` object has the following methods:
### `autoUpdater.setFeedUrl(url)`
* `url` String * `url` String
Set the `url` and initialize the auto updater. The `url` cannot be changed Set the `url` and initialize the auto updater. The `url` cannot be changed
once it is set. once it is set.
## autoUpdater.checkForUpdates() ### `autoUpdater.checkForUpdates()`
Ask the server whether there is an update. You must call `setFeedUrl` before Ask the server whether there is an update. You must call `setFeedUrl` before
using this API. using this API.