프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$httpClient | A Guzzle HTTP client. | ||
$loop | An event loop instance. | ||
$token | The Slack API token string. |
메소드 | 설명 | |
---|---|---|
__construct ( React\EventLoop\LoopInterface $loop, GuzzleHttp\ClientInterface $httpClient = null ) | Creates a new API client instance. | |
apiCall ( string $method, array $args = [] ) : React\Promise\PromiseInterface | Sends an API request. | |
getAuthedUser ( ) : React\Promise\PromiseInterface | Gets the currently authenticated user. | |
getChannelById ( string $id ) : React\Promise\PromiseInterface | Gets a channel by its ID. | |
getChannelByName ( string $name ) : React\Promise\PromiseInterface | Gets a channel by its name. | |
getChannelGroupOrDMByID ( string $id ) : React\Promise\PromiseInterface | Gets a channel, group, or DM channel by ID. | |
getChannels ( ) : React\Promise\PromiseInterface | Gets all channels in the team. | |
getDMById ( string $id ) : React\Promise\PromiseInterface | Gets a direct message channel by its ID. | |
getDMByUser ( |
Gets a direct message channel for a given user. | |
getDMByUserId ( string $id ) : React\Promise\PromiseInterface | Gets a direct message channel by user's ID. | |
getDMs ( ) : React\Promise\PromiseInterface | Gets all DMs the authenticated user has. | |
getGroupById ( string $id ) : React\Promise\PromiseInterface | Gets a group by its ID. | |
getGroupByName ( string $name ) : React\Promise\PromiseInterface | Gets a group by its name. | |
getGroups ( ) : React\Promise\PromiseInterface | Gets all groups the authenticated user is a member of. | |
getMessageBuilder ( ) : Slack\Message\MessageBuilder | Gets a message builder for creating a new message object. | |
getTeam ( ) : React\Promise\PromiseInterface | Gets information about the current Slack team logged in to. | |
getUserById ( string $id ) : React\Promise\PromiseInterface | Gets a user by its ID. | |
getUserByName ( $username ) : React\Promise\PromiseInterface | Gets a user by username. | |
getUsers ( ) : React\Promise\PromiseInterface | Gets all users in the Slack team. | |
postMessage ( |
Posts a message. | |
send ( string $text, slack\ChannelInterface $channel ) : React\Promise\PromiseInterface | Sends a regular text message to a given channel. | |
setToken ( string $token ) | Sets the Slack API token to be used during method calls. |
public __construct ( React\EventLoop\LoopInterface $loop, GuzzleHttp\ClientInterface $httpClient = null ) | ||
$loop | React\EventLoop\LoopInterface | |
$httpClient | GuzzleHttp\ClientInterface | A Guzzle client instance to send requests with. |
public getAuthedUser ( ) : React\Promise\PromiseInterface | ||
리턴 | React\Promise\PromiseInterface | A promise for the currently authenticated user. |
public getChannelById ( string $id ) : React\Promise\PromiseInterface | ||
$id | string | A channel ID. |
리턴 | React\Promise\PromiseInterface | A promise for a channel object. |
public getChannelByName ( string $name ) : React\Promise\PromiseInterface | ||
$name | string | The name of the channel. |
리턴 | React\Promise\PromiseInterface |
public getChannelGroupOrDMByID ( string $id ) : React\Promise\PromiseInterface | ||
$id | string | The channel ID. |
리턴 | React\Promise\PromiseInterface | A promise for a channel interface. |
public getChannels ( ) : React\Promise\PromiseInterface | ||
리턴 | React\Promise\PromiseInterface |
public getDMByUser ( |
||
$user | The user to get a DM for. | |
리턴 | React\Promise\PromiseInterface | A promise for a DM object. |
public getDMByUserId ( string $id ) : React\Promise\PromiseInterface | ||
$id | string | A user ID. |
리턴 | React\Promise\PromiseInterface | A promise for a DM object. |
public getDMs ( ) : React\Promise\PromiseInterface | ||
리턴 | React\Promise\PromiseInterface |
public getGroupById ( string $id ) : React\Promise\PromiseInterface | ||
$id | string | A group ID. |
리턴 | React\Promise\PromiseInterface | A promise for a group object. |
public getGroupByName ( string $name ) : React\Promise\PromiseInterface | ||
$name | string | The name of the group. |
리턴 | React\Promise\PromiseInterface |
public getGroups ( ) : React\Promise\PromiseInterface | ||
리턴 | React\Promise\PromiseInterface |
public getMessageBuilder ( ) : Slack\Message\MessageBuilder | ||
리턴 | Slack\Message\MessageBuilder |
public getTeam ( ) : React\Promise\PromiseInterface | ||
리턴 | React\Promise\PromiseInterface | A promise for the current Slack team. |
public getUserById ( string $id ) : React\Promise\PromiseInterface | ||
$id | string | A user ID. |
리턴 | React\Promise\PromiseInterface | A promise for a user object. |
public getUserByName ( $username ) : React\Promise\PromiseInterface | ||
리턴 | React\Promise\PromiseInterface | A promise for a user object. |
public getUsers ( ) : React\Promise\PromiseInterface | ||
리턴 | React\Promise\PromiseInterface | A promise for an array of users. |
public postMessage ( |
||
$message | The message to post. | |
리턴 | React\Promise\PromiseInterface |