Methods
(inner) addPlayerToQueue(id, player, cb)
Add a player to a queue given an queue _ID
Parameters:
Name | Type | Description |
---|---|---|
id |
String | the _id property of the queue |
player |
Object | The player object containing all informations |
cb |
function | Callback function that recieves the results of request. |
(inner) configure(url, key)
Initial configuration to access server
Something like a constructor
Parameters:
Name | Type | Description |
---|---|---|
url |
String | url that the service will access (Server) |
key |
String | API-KEY used on process. |
(inner) createQueue(name, cb)
Create a queue on a configurated server (See configure to see how to configure.)
Parameters:
Name | Type | Description |
---|---|---|
name |
String | Queue name |
cb |
function | Callback function to execute something after request |
(inner) getAllQueues(cb)
Get all Queues on server. (Queues that the API-KEY has access)
Parameters:
Name | Type | Description |
---|---|---|
cb |
function | Callback function to process result |
(inner) getPlayersOnQueue(obj, cb)
Get all player's information on a queue.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object | Data object. See object below |
cb |
function | CallbackFunction obj = { id: String -- The queue ID -- Needed plugin?: http address from plugin to be executed. } |
(inner) getQueue(obj, cb)
Get all queue's information, but do not include players on that queue. (See getPlayersOnQueue)
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object | Data object. See object below |
cb |
function | CallbackFunction obj = { id: String -- The queue ID -- Needed plugin?: http address from plugin to be executed. } |
(inner) removePlayerFromQueue(qId, pId, cb)
Remove a player from queue;
Parameters:
Name | Type | Description |
---|---|---|
qId |
String | Queue _ID |
pId |
String | Player _ID |
cb |
function | Callback Function |
(inner) removeQueue(id, cb)
Remove a queue from the server
Parameters:
Name | Type | Description |
---|---|---|
id |
String | the _id of the queue |
cb |
function | Callback function to process the result |