FANDOM


ajaxEdit

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.

getPrivateIdEdit

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)

getBlockedPrivateEdit

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)

blockEdit

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)

unblockEdit

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)

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.