From 454413f69ab6a33e9bc6baa7429390246ed529f0 Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Wed, 19 Aug 2015 18:55:11 +0200 Subject: [PATCH] Standardize auto-updater.md --- docs/api/auto-updater.md | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/docs/api/auto-updater.md b/docs/api/auto-updater.md index 5274fc6c467e..b2ebcc40a447 100644 --- a/docs/api/auto-updater.md +++ b/docs/api/auto-updater.md @@ -1,4 +1,4 @@ -# auto-updater +# autoUpdater **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. -## Event: error +## Events + +The `autoUpdater` object emits the following events: + +### Event: 'error' + +Returns: * `event` Event * `message` String Emitted when there is an error while updating. -## Event: checking-for-update +### Event: 'checking-for-update' 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 automatically. -## Event: update-not-available +### Event: 'update-not-available' Emitted when there is no available update. -## Event: update-downloaded +### Event: 'update-downloaded' + +Returns: * `event` Event * `releaseNotes` String @@ -130,14 +138,18 @@ Emitted when there is no available update. Emitted when an update has been downloaded. Calling `quitAndUpdate()` will restart the application and install the update. -## autoUpdater.setFeedUrl(url) +## Methods + +The `autoUpdater` object has the following methods: + +### `autoUpdater.setFeedUrl(url)` * `url` String Set the `url` and initialize the auto updater. The `url` cannot be changed once it is set. -## autoUpdater.checkForUpdates() +### `autoUpdater.checkForUpdates()` Ask the server whether there is an update. You must call `setFeedUrl` before using this API.