bootdesk/chat-sdk

LinearAdapter
in package
implements Adapter, SupportsDeleteMessages, SupportsEditMessages

Table of Contents

Interfaces

Adapter
SupportsDeleteMessages
SupportsEditMessages

Properties

$apiKey  : string
$apiUrl  : string
$botUserId  : string|null
$fileUploadConverter  : FileUploadConverter
$formatConverter  : LinearFormatConverter
$httpClient  : ClientInterface
$psrFactory  : Psr17Factory|null
$webhookVerifier  : LinearWebhookVerifier

Methods

__construct()  : mixed
addReaction()  : void
channelIdFromThreadId()  : string
createResponse()  : ResponseInterface|null
decodeThreadId()  : mixed
deleteMessage()  : void
disconnect()  : void
editMessage()  : SentMessage
encodeThreadId()  : string
fetchChannelInfo()  : ChannelInfo|null
fetchMessages()  : FetchResult
fetchThread()  : ThreadInfo
getBotUserId()  : string|null
getFormatConverter()  : FormatConverter|null
getName()  : string
getUser()  : UserInfo|null
initialize()  : void
openDM()  : string|null
parseWebhook()  : Message
postMessage()  : SentMessage
removeReaction()  : void
startTyping()  : void
stream()  : SentMessage|null
verifyWebhook()  : ResponseInterface|null
appendAttachments()  : string
graphqlMutation()  : array<string|int, mixed>|null
graphqlQuery()  : array<string|int, mixed>|null
graphqlRequest()  : array<string|int, mixed>|null
jsonResponse()  : ResponseInterface
parseComment()  : Message
renderBody()  : string

Properties

$apiUrl read-only

protected string $apiUrl = 'https://api.linear.app/graphql'

$psrFactory read-only

protected Psr17Factory|null $psrFactory = null

Methods

__construct()

public __construct(string $apiKey, ClientInterface $httpClient, string $webhookSecret[, string $apiUrl = 'https://api.linear.app/graphql' ][, Psr17Factory|null $psrFactory = null ][, FileUploadConverter|null $fileUploadConverter = null ]) : mixed
Parameters
$apiKey : string
$httpClient : ClientInterface
$webhookSecret : string
$apiUrl : string = 'https://api.linear.app/graphql'
$psrFactory : Psr17Factory|null = null
$fileUploadConverter : FileUploadConverter|null = null

addReaction()

public addReaction(string $threadId, string $messageId, string $emoji) : void
Parameters
$threadId : string
$messageId : string
$emoji : string

channelIdFromThreadId()

public channelIdFromThreadId(string $threadId) : string
Parameters
$threadId : string
Return values
string

createResponse()

public createResponse() : ResponseInterface|null
Return values
ResponseInterface|null

decodeThreadId()

public decodeThreadId(string $threadId) : mixed
Parameters
$threadId : string

deleteMessage()

public deleteMessage(string $threadId, string $messageId) : void
Parameters
$threadId : string
$messageId : string

encodeThreadId()

public encodeThreadId(mixed $platformData) : string
Parameters
$platformData : mixed
Return values
string

getBotUserId()

public getBotUserId() : string|null
Return values
string|null

openDM()

public openDM(string $userId) : string|null
Parameters
$userId : string
Return values
string|null

parseWebhook()

public parseWebhook(ServerRequestInterface $request) : Message
Parameters
$request : ServerRequestInterface
Return values
Message

removeReaction()

public removeReaction(string $threadId, string $messageId, string $emoji) : void
Parameters
$threadId : string
$messageId : string
$emoji : string

startTyping()

public startTyping(string $threadId) : void
Parameters
$threadId : string

stream()

public stream(string $threadId, iterable<string|int, mixed> $textStream[, array<string|int, mixed> $options = [] ]) : SentMessage|null
Parameters
$threadId : string
$textStream : iterable<string|int, mixed>
$options : array<string|int, mixed> = []
Return values
SentMessage|null

verifyWebhook()

public verifyWebhook(ServerRequestInterface $request) : ResponseInterface|null
Parameters
$request : ServerRequestInterface
Return values
ResponseInterface|null

graphqlMutation()

protected graphqlMutation(string $alias, string $mutationBody, array<string|int, mixed> $input) : array<string|int, mixed>|null
Parameters
$alias : string
$mutationBody : string
$input : array<string|int, mixed>
Return values
array<string|int, mixed>|null

graphqlQuery()

protected graphqlQuery(string $alias, string $queryBody, array<string|int, mixed> $variables) : array<string|int, mixed>|null
Parameters
$alias : string
$queryBody : string
$variables : array<string|int, mixed>
Return values
array<string|int, mixed>|null

graphqlRequest()

protected graphqlRequest(string $query, array<string|int, mixed> $variables) : array<string|int, mixed>|null
Parameters
$query : string
$variables : array<string|int, mixed>
Return values
array<string|int, mixed>|null

jsonResponse()

protected jsonResponse(int $status, string $message) : ResponseInterface
Parameters
$status : int
$message : string
Return values
ResponseInterface

parseComment()

protected parseComment(array<string|int, mixed> $payload, string $rawBody) : Message
Parameters
$payload : array<string|int, mixed>
$rawBody : string
Return values
Message
On this page

Search results