getList()

wrtc.getList() fetches a list from central storage on the IXNX server. Lists are different types of data at a secure, central location that survives power off. Some lists has been stored by previous wrtc.setList() calls, others generated by the IXNX server.

Arguments

wrtc.getList(list, data)

  • list - string containing type of data to retrieve
  • data - (optional) JSON structure containing details about the data to retrieve

list: call_log

When requesting call log argument data may contain an optional ID for last fetched entry. It is used if you want to receive more, older entries.

0 or missing means retrieve info about latest calls.

Example:

wrtc.getList("call_log") or wrtc.getList("call_log", {start:0}) requests info about latest calls.

The wrtc.onList() function may then receive a data structure there data.last_id is 78538. Then you can call wrtc.getList("call_log", {start:78538}) to request more, older entries from the call log.

list: msg_log

When requesting chat message log argument data may contain an optional ID for last fetched entry. It is used if you want to receive more, older entries.

0 or missing means retrieve info about latest messages.

Example:

wrtc.getList("msg_log") or wrtc.getList("msg_log", {start:0}) requests info about latest messages.

The wrtc.onList() function may then receive a data structure there data.last_id is 78538. Then you can call wrtc.getList("msg_log", {start:78538}) to request more, older entries from the message log.

Fetchable lists

The list argument supplied determines the type of data to retrieve:

  • "call_log" - fetch the list of calls user has made or received
  • "msg_log" - fetch the list of chat messages user has sent or received

See wrtc.onList() for details.

Returns

Nothing.

Events

Call to wrtc.getList() will result in a wrtc.onList() event that either returns the requested list or an error code:

  • 404: Not Found - unknown list type requested

Also See

ixnx/wrtc/js/api/wrtc/getlist.txt · Last modified: by tibor
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0