Ask the pages of a user
POST/wordplus/realtime/users/:id/ask
Sends an event to the open pages of a user and waits for their replies. A page answers the events it chose with the
browser rt.answer( event, handler ), which returns the reply. The answer comes with the first reply, or with
all once timeout is over, with every reply by then. No page answering is no reply.
Seal data with the key of the user to keep it from WordPlus Cloud (sealing): the pages seal their
replies with the same key. The packages do both by default.
In the packages: realtime.user( id ).ask( event, data, { timeout, all } ).
Request
Responses
- 200
- 400
- 401
- 403
- 413
The replies, in the order they came: one at most without all.
bad_event: a name kept for the rooms. bad_request: a timeout out of range.
missing_signature, stale_signature (a clock off by more than 5 minutes), unknown_site, bad_signature (a wrong secret, or a body or path other than the one signed).
not_included: your plan does not include it.
too_large: data over 1 MB. too_many: over 1,000 rooms or users in an event, or 100 events in a batch.