An extended native php wrapper for Carrot Quest API without requirements. Supports all methods and types of responses.
##Install The preferred way to install this extension is through composer.
Either run
php composer.phar require veksa/carrot-api "~1.0"
or add
"veksa/carrot-api": "~1.0"
to the require section of your composer.json
file.
$carrot = new \Veksa\Carrot\Api('YOUR_APP_ID', 'YOUR_CARROT_API_TOKEN');
Get the users who are currently online on the status of "online".
Get count of users (leads). User if the lead is considered to be, if known contacts about it: name, email, phone, User ID, or it was at least one dialogue.
Get all users (leads). User if the lead is considered to be, if known contacts about it: name, email, phone, User ID, or it was at least one dialogue.
filters array: array of filters, examples: https://carrotquest.io/developers/filters/.
prop string: property for sort. Default: $last_seen
order string: sort order. Default: desc
limit int: limit show users. Default: 20
offset int: start from. Default: 0
Get all the dialogues of application.
id int: user ID.
limit int: limit show dialogues. Default: 20
offset int: start from. Default: 0
closed bool|null: true - open dialogues, false - closed dialogues, null - all dialogues
assigned int|null: Id of Admin that dialogues is assign, or null
tags array: array of tags
Get information about the specific dialog.
id int: dialogue ID. Required options
Get messages in a specific dialog.
id int: dialogue ID. Required options
limit int: limit show users. Default: 20
offset int: start from. Default: 0
Send messages to a specific dialog.
id int: dialogue ID. Required options
message string: text of message. Required options
type string: type of message. Default: note
botName string: name of bot. Default: Bot
fromUser bool: true - message from user
fromAdmin int: Id of Admin or default_admin to send message from admin
randomId int: random Id of message, for control delivery. Default: 0
autoAssign int: Id of Admin than auto assign to him
autoAssignRandomId int: random Id of message, for control assign delivery. Default: 0
Mark all messages as read in the dialogue (by the user on the site).
id int: dialogue ID. Required options
Set typing message in conversation.
id int: dialogue ID. Required options
message string: message.
botName string: set typing botName
fromUser bool: set typing from user
fromAdmin int: set typing from admin
Assign a specific dialogue defined by the administrator (or removes the assignment).
id int: dialogue ID. Required options
adminId int|null: admin ID or null to remove assignment.
fromAdminId int|null: admin ID from assignment
botName string: bot name from assignment. Default: Bot
randomId int: number for control assignment
Add tag to dialogue.
id int: dialogue ID. Required options
tag string: tag.
fromAdminId int|null: admin ID from assignment
botName string: bot name from assignment. Default: Bot
randomId int: number for control assignment
Delete tag from dialogue.
id int: dialogue ID. Required options
tag string: tag.
fromAdminId int|null: admin ID from assignment
botName string: bot name from assignment. Default: Bot
randomId int: number for control assignment
Close the conversation.
id int: dialogue ID. Required options
fromAdminId int|null: admin ID from assignment
botName string: bot name from assignment. Default: Bot
randomId int: number for control assignment
Get user by ID.
id int: user ID. Required options
isSystem bool: system or local ID. Default is system
Add or Update user props.
id int: user ID. Required options
props array: array of props. Required options
isSystem bool: is system ID?
Delete user props.
id int: user ID. Required options
props array: array of props. Required options
isSystem bool: is system ID?
Set user status.
id int: user ID. Required options
presence string: user status. Required options
sessionId string: session ID Required options
Send messages to a specific user.
id int: user ID. Required options
message string: text of message. Required options
type string: is note or message. Default: popup_chat
Start conversation with user.
id int: user ID. Required options
message string: text of message. Required options
Tracking events, which is performed by the user.
id int: user ID. Required options
eventName string: name of event. Required options
additionalParams array: additional params
Receive events that the user makes a chronologically.
id int: user ID. Required options
eventName string: name of event to filter.
limit int: limit show users. Default: 20
offset int: start from. Default: 0
Please see CHANGELOG for more information what has changed recently.
$ composer test
Please see CONTRIBUTING for details.
If you discover any security related issues, please email admin@devblog.pro instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.