new QueuesPlugin()
Constructor for Queues plugin.
Instance will be created each time when new WTAPI instance is created.
Plugin could be accessible thought WTAPI with queues property.
Plugin could be accessible thought WTAPI with queues property.
- Source:
Extends
- WTAPI.Observer
Classes
Methods
add(queue, extension, callback)
Add member to a specified queue.
When member will be added he will have a Dynamic membership.
Parameters:
Name | Type | Description |
---|---|---|
queue |
Queue | |
extension |
String | |
callback |
QueueActionCallback |
- Source:
getQueue(id) → {Queue}
Returns a list of available queues.
Parameters:
Name | Type | Description |
---|---|---|
id |
String | A Queue ID |
- Source:
Returns:
A Queue Object or null if queue is not found.
- Type
- Queue
getQueues() → {Array}
Returns a list of available queues.
- Source:
Returns:
- Type
- Array
isSubscribed() → {boolean}
Checks whether WTAPI is Subscribed to Queues events
- Source:
Returns:
- Type
- boolean
pause(queue, member, callback)
Pause a member in queue.
When user is on pause, he wouldn't receive a new calls from that queue.
Parameters:
Name | Type | Description |
---|---|---|
queue |
Queue | |
member |
QueueMember | |
callback |
QueueActionCallback |
- Source:
remove(queue, member, callback)
Remove a Dynamic member from a queue
Parameters:
Name | Type | Description |
---|---|---|
queue |
Queue | |
member |
QueueMember | |
callback |
QueueActionCallback |
- Source:
resume(queue, member, callback)
Resume a member from pause
Parameters:
Name | Type | Description |
---|---|---|
queue |
Queue | |
member |
QueueMember | |
callback |
QueueActionCallback |
- Source:
subscribe(callback)
Subscribe to a queue events
Parameters:
Name | Type | Description |
---|---|---|
callback |
- Source:
unsubscribe(callback)
Removes subscription from a queues events
Parameters:
Name | Type | Description |
---|---|---|
callback |
function |
- Source: