You are here

SlackInterface.php in Slack 8

Namespace

Drupal\slack

File

src/SlackInterface.php
View source
<?php

namespace Drupal\slack;


/**
 * Interface for the Slack service.
 */
interface SlackInterface {

  /**
   * Sends a message to a Slack channel.
   *
   * @param string $message
   *   The message sent to the channel.
   * @param string $channel
   *   The channel in the Slack service to send messages.
   * @param string $username
   *   The bot name displayed in the channel.
   *
   * @return bool|object
   *   Slack response.
   *
   * @throws \GuzzleHttp\Exception\GuzzleException
   */
  public function sendMessage($message, $channel = '', $username = '');

}

Interfaces

Namesort descending Description
SlackInterface Interface for the Slack service.