Shell¶
Shell is a low-level interface to the Freebox Player for applications to require specific rights or data. Normally, Shell requests are wrapped into Freebox components (InApp, …) but there do not exist wrapper for parental code or FreeboxOS access. Then, to require parental code validation in the application, or to require a FreeboxOS API token, it is still necessary to use the Shell interface.
- method Shell.request(method, args, debug)¶
- Parameters
method (
string
) – The method to callargs (
object
) – The arguments of the method
- Returns
A new
Deferred.Deferred()
instance yielding an object
Methods are of:
gw_authz_query: ask for a Server FreeboxOS access token,
parental_code_validate: ask user to validate his parental code.
Usage for gw_authz_query method:
var pl = "explorer, downloader, settings, contacts, calls, parental, pvr"; Shell.request("gw_authz_query", { permissions: pl }).then(function (ret) { console.log("Done", JSON.stringify(ret)); }, function (err) { console.log("Error", JSON.stringify(err); });
Usage for parental_code_validate method:
Shell.request("parental_code_validate", { categoryV: true }).then(function (ret) { console.log("Done ", JSON.stringify(ret)); }, function (err) { console.log("Error", JSON.stringify(err); });
Note that the manifest.json must have appropriate capabilities.