crisp-im / php-crisp-api

:elephant: Crisp API PHP Wrapper
https://docs.crisp.chat/guides/rest-api/
MIT License
56 stars 28 forks source link

Add conversation routing related methods #13

Closed yannlugrin closed 5 years ago

yannlugrin commented 5 years ago

This PR adds methods related to the conversation routing that can be used like in following examples:

require __DIR__ . '/vendor/autoload.php';
$CrispClient = new Crisp();

$CrispClient->authenticate(identifier, key);

$routing = $CrispClient->websiteConversations->getRouting($websiteId, $sessionId);
require __DIR__ . '/vendor/autoload.php';
$CrispClient = new Crisp();

$CrispClient->authenticate(identifier, key);

$params = [
  'assigned' => [
    'user_id' => $userId,
  ]
];
$routing = $CrispClient->websiteConversations->assignRouting($websiteId, $sessionId, $params);
valeriansaliou commented 5 years ago

Perfect, thanks :)