Overview
  • Namespace
  • Class

Namespaces

  • Slack
    • Message

Classes

  • ApiClient
  • Bot
  • Channel
  • ClientObject
  • DataObject
  • DirectMessageChannel
  • Group
  • Payload
  • RealTimeClient
  • Team
  • User

Interfaces

  • ChannelInterface
  • Exception

Exceptions

  • ApiException
  • ConnectionException
  • UserNotFoundException

Class RealTimeClient

A client for the Slack real-time messaging API.

Slack\ApiClient
Extended by Slack\RealTimeClient uses Evenement\EventEmitterTrait (not available)
Namespace: Slack
Located at RealTimeClient.php

Methods summary

public React\Promise\PromiseInterface
# connect( )

Connects to the real-time messaging server.

Connects to the real-time messaging server.

Returns

React\Promise\PromiseInterface
public
# disconnect( )

Disconnects the client.

Disconnects the client.

public React\Promise\PromiseInterface
# getTeam( )

Gets information about the current Slack team logged in to.

Gets information about the current Slack team logged in to.

Returns

React\Promise\PromiseInterface
A promise for the current Slack team.

Overrides

Slack\ApiClient::getTeam
public React\Promise\PromiseInterface
# getChannels( )

Gets all channels in the team.

Gets all channels in the team.

Returns

React\Promise\PromiseInterface

Overrides

Slack\ApiClient::getChannels
public React\Promise\PromiseInterface
# getChannelById( string $id )

Gets a channel by its ID.

Gets a channel by its ID.

Parameters

$id
A channel ID.

Returns

React\Promise\PromiseInterface
A promise for a channel object.

Overrides

Slack\ApiClient::getChannelById
public React\Promise\PromiseInterface
# getGroups( )

Gets all groups the authenticated user is a member of.

Gets all groups the authenticated user is a member of.

Returns

React\Promise\PromiseInterface

Overrides

Slack\ApiClient::getGroups
public React\Promise\PromiseInterface
# getGroupById( string $id )

Gets a group by its ID.

Gets a group by its ID.

Parameters

$id
A group ID.

Returns

React\Promise\PromiseInterface
A promise for a group object.

Overrides

Slack\ApiClient::getGroupById
public React\Promise\PromiseInterface
# getDMs( )

Gets all DMs the authenticated user has.

Gets all DMs the authenticated user has.

Returns

React\Promise\PromiseInterface

Overrides

Slack\ApiClient::getDMs
public React\Promise\PromiseInterface
# getDMById( string $id )

Gets a direct message channel by its ID.

Gets a direct message channel by its ID.

Parameters

$id
A DM channel ID.

Returns

React\Promise\PromiseInterface
A promise for a DM object.

Overrides

Slack\ApiClient::getDMById
public React\Promise\PromiseInterface
# getUsers( )

Gets all users in the Slack team.

Gets all users in the Slack team.

Returns

React\Promise\PromiseInterface
A promise for an array of users.

Overrides

Slack\ApiClient::getUsers
public React\Promise\PromiseInterface
# getUserById( string $id )

Gets a user by its ID.

Gets a user by its ID.

Parameters

$id
A user ID.

Returns

React\Promise\PromiseInterface
A promise for a user object.

Overrides

Slack\ApiClient::getUserById
public React\Promise\PromiseInterface
# getBots( )

Gets all bots in the Slack team.

Gets all bots in the Slack team.

Returns

React\Promise\PromiseInterface
A promise for an array of bots.
public React\Promise\PromiseInterface
# getBotById( string $id )

Gets a bot by its ID.

Gets a bot by its ID.

Parameters

$id
A bot ID.

Returns

React\Promise\PromiseInterface
A promise for a bot object.
public React\Promise\PromiseInterface
# postMessage( Slack\Message\Message $message )

Posts a message.

Posts a message.

Parameters

$message
The message to post.

Returns

React\Promise\PromiseInterface

Overrides

Slack\ApiClient::postMessage
public boolean
# isConnected( )

Returns whether the client is connected.

Returns whether the client is connected.

Returns

boolean

Methods inherited from Slack\ApiClient

__construct(), apiCall(), getAuthedUser(), getChannelByName(), getChannelGroupOrDMByID(), getDMByUser(), getDMByUserId(), getGroupByName(), getMessageBuilder(), getUserByName(), send(), setToken()

Constants summary

Constants inherited from Slack\ApiClient

BASE_URL

Properties summary

protected Devristo\Phpws\Client\WebSocket $websocket

A websocket connection to the Slack API.

A websocket connection to the Slack API.

#
protected integer $lastMessageId

The ID of the last payload sent to Slack.

The ID of the last payload sent to Slack.

# 0
protected array $pendingMessages

An array of pending messages waiting for successful confirmation from Slack.

An array of pending messages waiting for successful confirmation from Slack.

# []
protected boolean $connected

Indicates if the client is connected.

Indicates if the client is connected.

# false
protected Slack\Team $team

The team logged in to.

The team logged in to.

#
protected array $users

A map of users.

A map of users.

# []
protected array $channels

A map of channels.

A map of channels.

# []
protected array $groups

A map of groups.

A map of groups.

# []
protected array $dms

A map of direct message channels.

A map of direct message channels.

# []
protected array $bots

A map of bots.

A map of bots.

# []

Properties inherited from Slack\ApiClient

$httpClient, $loop, $token

API documentation generated by ApiGen