If you like BoxMatrix then please contribute Supportdata, Supportdata2, Firmware and/or Hardware (get in touch).
My metamonk@yahoo.com is not reachable by me since years. Please use hippie2000@webnmail.de instead.

0
U

Property:func.lua

From BoxMatrix


BoxMatrix >> Webinterface >> func.lua @ BoxMatrix   -   IRC-Chat   -   Translate: de es fr it nl pl
News Selectors Models Accessories Components Environment Config Commands System Webif Software Develop Lexicon Community Project Media

UI-Structure UI-Modules HTML-Files XML-Files REST-API Lua-Scripts Javascript Browser SSI-Files SSI-Directives HTML-Text Event-Text Help-Pages CSS-Files Graphics Research

RESTAPI-Script

Goto:   Functions  -  Dependencies   -   Model-Matrix   -   SMW-Browser

Details

func.lua provides the REST-API common collection of (mostly) higher order functions.

Being located in the common subfolder it is included by require("common.func").

REST-API:

Functions

The function names of scripts often help to understand function blocks (and show gaps in the docs). fw 8.00 functions:

$ grep -e '^function' -e '^local function' /usr/rest_api/common/func.lua

# return items stored in tbl and additional varargs as commaseparated values
local function merge_args(tbl, ...)

# revert the order of varargs
local function revert(...)

# Empty function
function func.noop()

# Identity function
function func.id(x)

# Constant function - returns a function that always returns the same given value
function func.const(x)

# Wraps a function in a function that only accepts the given number of arguments 
function func.restrict(n, fn)

# Wraps a function in a function, which logically negates the (first) return-value of the wrapped function
function func.negate(fn)

# creates a function for equality-comparison with a given value
function func.eq(value, key)

# creates a function for inequality-comparison with a given value
function func.neq(value, key)

# creates a comparison-function for "less than"
function func.lt(key)

# creates a function for checking if a string matches a pattern
function func.match(pattern, key)

# creates a getter-function for tables
function func.get(key, default)

# partial application of a function
function func.partial(fn, ...)

# Performs left-to-right function composition, like Unix-pipes
function func.pipe(...)

# Performs right-to-left function composition, like in mathematics
function func.compose(...) 

Dependencies

Daily updated index of all dependencies of this script. Last update: GMT.
A * in the Mod column marks info from Supportdata-Probes, which will always stay incomplete.
If an Object includes itself then this is a file with the same name but another Path and the dependencies are merged.

Relation Typ Object Mod Firmware Info Origin
Requires rest typecheck.lua 25 7.70 - 8.00 REST-API common internal typecheck function AVM
Required by rest api_generic.lua 25 7.90 - 8.00 REST-API Generic Endpoints AVM
Required by rest cable_providerlist.lua 24 7.90 - 8.00 TODO AVM
Required by rest connections.lua (restapi) 25 7.70 - 8.00 TODO AVM
Required by rest cookie.lua 25 7.70 - 8.00 TODO AVM
Required by rest country.lua (restapi) 25 7.70 - 8.00 TODO AVM
Required by rest datatype.lua 25 7.90 - 8.00 REST-API Datatype Conversion AVM
Required by rest eventlog.lua 25 7.90 - 8.00 REST-API Plugin for the Event-Log+ AVM
Required by rest fiber.lua (restapi) 25 7.70 - 8.00 TODO AVM
Required by rest handsets.lua 25 7.90 - 8.00 TODO AVM
Required by rest internet.lua (restapi) 25 7.70 - 8.00 TODO AVM
Required by rest isp.lua (restapi) 25 7.70 - 8.00 TODO AVM
Required by rest locale.lua 25 7.70 - 8.00 TODO AVM
Required by rest mesh.lua 25 7.70 - 8.00 TODO AVM
Required by rest mobile.lua (restapi) 25 7.70 - 8.00 TODO AVM
Required by rest phonebook.lua (restapi) 25 7.90 - 8.00 REST-API Plugin for the Phonebook AVM
Required by rest phone_numbers.lua 25 7.70 - 8.00 TODO AVM
Required by rest progress.lua 25 7.70 - 8.00 TODO AVM
Required by rest saveset.lua 25 7.70 - 8.00 TODO AVM
Required by rest timermix.lua 25 7.90 - 8.00 REST-API Plugin for XML timers AVM
Required by rest update.lua (restapi) 25 7.70 - 8.00 TODO AVM
Required by rest validcheck.lua 25 7.90 - 8.00 REST-API common validation helper functions AVM
Required by rest wifi.lua (restapi) 25 7.70 - 8.00 TODO AVM
23 dependencies for this script

Model-Matrix

Daily updated index of the presence, path and size of this script for each model. Last update: GMT.
Showing all models using this script. Click any column header (click-wait-click) to sort the list by the respective data.
The (main/scrpn/boot/arm/prx/atom/rtl) label in the Model column shows which CPU is meant for Multi-Linux models.
Note that this list is merged from Firmware-Probes of all known AVM firmware for a model, including Recovery.exe and Labor-Files.

Model Firmware Path Size/Bytes
FRITZ!Box 4040 7.90 - 8.00 /usr/rest_api/common 9.3k
FRITZ!Box 4050 7.90 /usr/rest_api/common 9.3k
FRITZ!Box 4060 7.90 /usr/rest_api/common 9.3k
FRITZ!Box 5530 Fiber (main) 7.70 - 8.00 /usr/rest_api/common 9.3k
FRITZ!Box 5590 Fiber (main) 7.70 - 8.00 /usr/rest_api/common 9.3k
FRITZ!Box 5590 Fiber (prx) 7.70 - 8.00 /usr/rest_api/common 9.3k
FRITZ!Box 6591 Cable (arm) 8.00 /usr/rest_api/common 9.3k
FRITZ!Box 6591 Cable (atom) 7.90 /usr/rest_api/common 9.3k
FRITZ!Box 6660 Cable (arm) 7.90 - 8.00 /usr/rest_api/common 9.3k
FRITZ!Box 6660 Cable (atom) 7.90 /usr/rest_api/common 9.3k
FRITZ!Box 6670 Cable (arm) 7.90 /usr/rest_api/common 9.3k
FRITZ!Box 6670 Cable (atom) 7.90 /usr/rest_api/common 9.3k
FRITZ!Box 6690 Cable (arm) 7.90 /usr/rest_api/common 9.3k
FRITZ!Box 6690 Cable (atom) 7.90 /usr/rest_api/common 9.3k
FRITZ!Box 6850 5G 7.90 /usr/rest_api/common 9.3k
FRITZ!Box 6850 LTE 7.90 /usr/rest_api/common 9.3k
FRITZ!Box 7510 7.90 - 8.00 /usr/rest_api/common 9.3k
FRITZ!Box 7520 8.00 /usr/rest_api/common 9.3k
FRITZ!Box 7520 v2 (main) 7.90 - 8.00 /usr/rest_api/common 9.3k
FRITZ!Box 7530 7.90 - 8.00 /usr/rest_api/common 9.3k
FRITZ!Box 7530 AX 7.70 - 8.00 /usr/rest_api/common 9.3k
FRITZ!Box 7583 VDSL (main) 8.00 /usr/rest_api/common 9.3k
FRITZ!Box 7590 (main) 7.90 - 8.00 /usr/rest_api/common 9.3k
FRITZ!Box 7590 AX (main) 7.70 - 8.00 /usr/rest_api/common 9.3k
FRITZ!Box 7690 7.90 /usr/rest_api/common 9.3k
25 models use this script

SMW-Browser

Information is currently being retrieved from the backend.
 

Synonyms

Showing 1 related property.

f