Apps

Maintainer: Michiel de Jong mic.nosp@m.hiel@unhost.nosp@m.ed.org Version: - 0.1.0

Summary
AppsMaintainer: Michiel de Jong mic.nosp@m.hiel@unhost.nosp@m.ed.org Version: - 0.1.0
Functions
remoteStorage.apps.installAppAdd an app to the user’s list of installed apps.
remoteStorage.apps.uninstallAppRemove an app to the user’s list of installed apps.
remoteStorage.apps.onChannelChangeSet the change event handler.
remoteStorage.apps.onAppsChangeSet the change event handler.
Schemas
apps/appInfo necessary for displaying a link to an app in an app store
Functions
remoteStorage.apps.getInstalledAppsGet a dictionary of apps whihch the user has installed.
remoteStorage.apps.getAvailableAppsGet a dictionary of apps whihch the user does not have installed, but which are available to install.

Functions

remoteStorage.apps.installApp

Add an app to the user’s list of installed apps.  Will trigger the change handler to be called if you previously set one using `remoteStorage.apps.onChange(handler);`.

Parameters

namename of the app (key in the defaultApps dictionary)

remoteStorage.apps.uninstallApp

Remove an app to the user’s list of installed apps.  Will trigger the change handler to be called if you previously set one using `remoteStorage.apps.onChange(handler);`.

Parameters

namename of the app (key in the defaultApps dictionary)

remoteStorage.apps.onChannelChange

Set the change event handler.  This will be called, with the app channel URL as the only argument, on page load and then whenever it changes.  Example:

remoteStorage.apps.onChannelChange(function(url) { myChannelUrlInput.value = url; });

Parameters

handlera Function that takes a dictionary of apps as its only argument

remoteStorage.apps.onAppsChange

Set the change event handler.  This will be called, with the dictionary of installed apps as the only argument, once on page load, and then whenever the list of installed apps changes.  Example:

remoteStorage.apps.onChange(function(apps) { myAppsView.reset(); for (var i in apps) { myAppsView.add(apps[i]); } myAppsView.render(); });

Parameters

handlera Function that takes a dictionary of apps as its only argument

Schemas

apps/app

Info necessary for displaying a link to an app in an app store

namethe name of the app that’s being described here (string)
hreflaunch URL (string)
imgURL of a 128x128px app icon (string)

Functions

remoteStorage.apps.getInstalledApps

Get a dictionary of apps whihch the user has installed.

Parameters

(none)

Returns: A dictionary from string app names to objects that follow the apps/app schema defined above.

remoteStorage.apps.getAvailableApps

Get a dictionary of apps whihch the user does not have installed, but which are available to install.

Parameters

cloneableOnlyboolean; if set to true, only returns apps whose assets you can clone to your own storage.

Returns: A dictionary from string app names to objects that follow the apps/app schema defined above.

Close