Monchbox Wiki
Advertisement

ajax[]

Torus.io.ajax = function(method, post, callback) {
Make an AJAX request to the chat API.
Arguments
  • String method: Method to call on the server.
  • Object post: Optional. Post data to include with the request.
  • function callback: Optional. Callback to execute when the request is complete.
Return value undefined.
Time complexity O(n) for params in post.

getPrivateId[]

Torus.io.getPrivateId = function(users, callback) {
Get the room id for a private room containing the specified users.
Arguments
  • Array users: A list of users to be in the private room.
  • functional callback: Optional. Callback to execute when the request is complete.
Return value undefined.
Time complexity O(1)

getBlockedPrivate[]

Torus.io.getBlockedPrivate = function(callback) {
Get the list of users you have blocked and users who have blocked you.
Arguments
  • function callback: Optional. Callback to execute when the request is complete.
Return value undefined.
Time complexity O(1)

block[]

Torus.io.block = function(user, callback) {
Block a user from private chatting with you.
Arguments
  • String user: The user to block.
  • function callback: Optional. Callback to execute when the request is complete.
Return value undefined.
Time complexity O(1)

unblock[]

Torus.io.unblock = function(user, callback) {
Unblock a user from private chatting with you.
Arguments
  • String user: The user to unblock.
  • function callback: Optional.Callback to execute when the request is complete.
Return value undefined.
Time complexity O(1)
Advertisement