Fix up some callback style code samples

This commit is contained in:
Will Anderson
2015-10-05 10:35:01 -07:00
parent 3aa62aba45
commit 9189069bc6

View File

@@ -81,7 +81,7 @@ Contains details about an update package that has been downloaded locally or alr
- __packageSize__: The size of the package, in bytes. (Number)
### Methods
- __apply(applySuccess, applyError, rollbackTimeout)__: Applies this package to the application. The application will be reloaded with this package and on every application launch this package will be loaded.
- __apply(rollbackTimeout): Promise__: Applies this package to the application. The application will be reloaded with this package and on every application launch this package will be loaded.
If the rollbackTimeout parameter is provided, the application will wait for a codePush.notifyApplicationReady() for the given number of milliseconds.
If codePush.notifyApplicationReady() is called before the time period specified by rollbackTimeout, the apply operation is considered a success.
Otherwise, the apply operation will be marked as failed, and the application is reverted to its previous version.
@@ -99,8 +99,7 @@ Contains details about an update package that is available for download.
- __downloadUrl__: The URL at which the package is available for download. (String)
### Methods
- __download(downloadSuccess, downloadError)__: Downloads the package update from the Code Push service. The ```downloadSuccess``` callback is invoked with a ```LocalPackage``` argument, representing the downloaded package.
- __download(): Promise<LocalPackage>__: Downloads the package update from the Code Push service. Returns a Promise that resolves with the LocalPackage.
## codePush.checkForUpdate
Queries the Code Push server for updates.