You are here

public function MoxtraService::sendMessage in Opigno Moxtra 3.x

Same name and namespace in other branches
  1. 8 src/MoxtraService.php \Drupal\opigno_moxtra\MoxtraService::sendMessage()

Sends message to the workspace.

Parameters

int $owner_id: User ID.

string $binder_id: Binder ID.

string $message: Message.

Return value

array Response data.

Overrides MoxtraServiceInterface::sendMessage

2 calls to MoxtraService::sendMessage()
MoxtraService::addUsersToWorkspace in src/MoxtraService.php
Adds users to the workspace.
MoxtraService::removeUserFromWorkspace in src/MoxtraService.php
Removes users from the workspace.

File

src/MoxtraService.php, line 413

Class

MoxtraService
Implements Moxtra REST API.

Namespace

Drupal\opigno_moxtra

Code

public function sendMessage($owner_id, $binder_id, $message) {
  $data = [
    'text' => $message,
  ];
  $url = $this
    ->getSendMessageUrl($owner_id, $binder_id);
  return $this->moxtraConnector
    ->request($url, $data);
}