From 355a48866d1a43df9443a3b559c8ec8642343f3a Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 5 Nov 2019 10:18:51 +0100 Subject: documentation: change JS docs template Use another template for the JS api documentation which provides a better overview over the classes and methods. Signed-off-by: Jo-Philipp Wich --- documentation/jsapi/LuCI.Request.poll.html | 2182 ++++++++++++++++++++-------- 1 file changed, 1550 insertions(+), 632 deletions(-) (limited to 'documentation/jsapi/LuCI.Request.poll.html') diff --git a/documentation/jsapi/LuCI.Request.poll.html b/documentation/jsapi/LuCI.Request.poll.html index 06c700dc4f..656f91152b 100644 --- a/documentation/jsapi/LuCI.Request.poll.html +++ b/documentation/jsapi/LuCI.Request.poll.html @@ -1,285 +1,1305 @@ - + - JSDoc: Class: poll - - - + Class: poll + + + + + - - + + + + + + + + - -
- -

Class: poll

- +
+ +
+

Class: poll

+
- +
+

+ LuCI.Request. -

- LuCI.Request.poll

- -

The Request.poll class provides some convience wrappers around + poll + + +

The Request.poll class provides some convience wrappers around LuCI.Poll mainly to simplify registering repeating HTTP request calls as polling functions.

- -
+
+ + +
+
+

+ + new LuCI.Request.poll() +

+ + +
+ luci.js, line 881 +
+ +
+ +
+
+ + - - - - - - - - - - - - - + + + + + + +
- - + - - - - - - - - - - -
Source:
-
- - - + +
+ + + - - - - - - - - - - - - - - - - + + + + + + + +
- - - - - - - - + + + + + +

Methods

- +
- +
+
+

+ + active() +

+ +
+ luci.js, line 985 +
+ +
-

active()

+
+
- + +
+

Alias for LuCI.Poll.active().

+
- - -
-

Alias for LuCI.Poll.active().

-
- - - - - - - - - - - - - + + + + + + +
- - + - - - - - - - - - - -
Source:
-
- - - + +
+ + + - - - - - - - - - - - - - - - - + + + + + + + +
- +
+
+

+ + add(interval, url, options, callback){function} +

+ +
+ luci.js, line 924 +
+ +
-

add(interval, url, optionsopt, callbackopt) → {function}

+
+
- - - - -
-

Register a repeating HTTP request with an optional callback +

+

Register a repeating HTTP request with an optional callback to invoke whenever a response for the request is received.

-
- - - - - - - - +
+ -
Parameters:
+ + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + - - - - - + - - - + + + - + - - - - - + - - - + + + - + - - - - - + - - - + + + - + - - - - - - - - - -
NameTypeAttributesDescription
NameTypeDescription
interval @@ -288,29 +1308,26 @@ to invoke whenever a response for the request is received.

- - - - - -

The poll interval in seconds.

+ + + + + + +

The poll interval in seconds.

url @@ -319,29 +1336,26 @@ to invoke whenever a response for the request is received.

- - - - - -

The URL to request on each poll.

+ + + + + + +

The URL to request on each poll.

options @@ -350,31 +1364,28 @@ to invoke whenever a response for the request is received.

- - <optional>
- - - - - -

Additional options to configure the request.

+ + + optional + + + + + +

Additional options to configure the request.

callback @@ -383,89 +1394,63 @@ to invoke whenever a response for the request is received.

- - <optional>
- - - - - -

Callback function to -invoke for each HTTP reply.

- - - - - - + + + + optional + + + + + +

Callback function to +invoke for each HTTP reply.

+ + + + + + + +
- - + - - - - - - - - - - -
Source:
-
- - - + +
+ + + - - - - - - - - - - -
Throws:
- - + + + +
Throws:
+ +
@@ -473,7 +1458,6 @@ invoke for each HTTP reply.

Throws TypeError when an invalid interval was passed.

-
@@ -487,95 +1471,103 @@ invoke for each HTTP reply.

-
- - - -
Returns:
- -
-

Returns the internally created poll function.

-
- + + +
Returns:
+ -
-
- Type -
-
+ + + -function - - - - - + + + + + + + + + + + + +
TypeDescription
+ + function + + + Returns the internally created poll function.
- - - + + + +
- +
+
+

+ + remove(entry){boolean} +

+ +
+ luci.js, line 961 +
+ +
-

remove(entry) → {boolean}

+
+
- - - - -
-

Remove a polling request that has been previously added using add(). +

+

Remove a polling request that has been previously added using add(). This function is essentially a wrapper around LuCI.Poll.remove().

-
- - - - - - - - +
+ -
Parameters:
+ + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + - - - - + + - - - + + +
NameTypeDescription
NameTypeDescription
entry @@ -584,341 +1576,293 @@ This function is essentially a wrapper around

The poll function returned by add().

+ +

The poll function returned by add().

- - - - - - + + +
- - + - - - - - - - - - - -
Source:
-
- - - + +
+ + + + + + + + +
Returns:
+ - - - - - - - - - - -
Returns:
- - -
-

Returns true if any function has been removed, else false.

-
- - - -
-
- Type -
-
+ + + -boolean - - - - - + + + + + + + + + + + + +
TypeDescription
+ + boolean + + + Returns true if any function has been removed, else false.
- - - + + + +
- +
+
+

+ + start() +

+ +
+ luci.js, line 969 +
+ +
-

start()

+
+
- + +
+

Alias for LuCI.Poll.start().

+
- - -
-

Alias for LuCI.Poll.start().

-
- - - - - - - - - - - - - + + + + + + +
- - + + + - - - - - - - - - - -
Source:
-
- - -
+ + + - - - - - - - - - - - - - - - - + + + + + + + +
- +
+
+

+ + stop() +

+ +
+ luci.js, line 977 +
+ +
-

stop()

+
+
- + +
+

Alias for LuCI.Poll.stop().

+
- - -
-

Alias for LuCI.Poll.stop().

-
- - - - - - - - - - - - - + + + + + + +
- - + - - - - - - - - - - -
Source:
-
- - - + +
+ + + - - - - - - - - - - - - - - - - - - + + + + + + +
+
+ +

Type Definitions

- +
- +
+
+

+ + callbackFn(res, data, duration) +

+ +
+ luci.js, line 882 +
+ +
-

callbackFn(res, data, duration)

+
+
- - - - -
-

The callback function is invoked whenever an HTTP reply to a +

+

The callback function is invoked whenever an HTTP reply to a polled request is received or when the polled request timed out.

-
- - - - - - - - +
+ -
Parameters:
+ + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + - - - - + + - - - + + + - + - - - - - - - + + + - + - - - - + + - - - + + +
NameTypeDescription
NameTypeDescription
res @@ -927,21 +1871,21 @@ out.

The HTTP response object.

+ +

The HTTP response object.

data @@ -950,22 +1894,22 @@ out.

The response JSON if the response could be parsed as such, + +

+ +

The response JSON if the response could be parsed as such, else null.

duration @@ -974,106 +1918,80 @@ else null.

The total duration of the request in milliseconds.

+ +

The total duration of the request in milliseconds.

- - - - - - + + +
- - + - - - - - - - - - - -
Source:
-
- - - + +
+ + + + + + + + + + +
- - - - - - - - - - - - - - - - - +
+ + - - - + -
- -
-
- Documentation generated by JSDoc 3.6.3 on Tue Nov 05 2019 09:33:05 GMT+0100 (Central European Standard Time) -
+ - - +
+ Documentation generated by JSDoc 3.6.3 on Tue Nov 05 2019 10:17:12 GMT+0100 (Central European Standard Time) +
+
+ + + \ No newline at end of file -- cgit v1.2.3