Class: MattermostClient
@pvm/mattermost.MattermostClient
Hierarchy
↳
MattermostClient
Constructors
constructor
• new MattermostClient(name
, config
, clientConfig?
)
Parameters
Name | Type |
---|---|
name | string |
config | Config |
clientConfig | MessengerClientConfig |
Inherited from
AbstractMessengerClient.constructor
Defined in
packages/pvm-notifications/lib/abstract-messenger-client.ts:8
Properties
clientConfig
• Protected
clientConfig: MessengerClientConfig
= {}
Inherited from
AbstractMessengerClient.clientConfig
config
• Protected
config: Config
Inherited from
AbstractMessengerClient.config
name
• name: string
Inherited from
Methods
createDirectChannel
â–¸ createDirectChannel(userName
): Promise
<string
>
Parameters
Name | Type |
---|---|
userName | string |
Returns
Promise
<string
>
Defined in
packages/pvm-mattermost/lib/index.ts:74
getChannelIdFromChannelName
â–¸ getChannelIdFromChannelName(channelName
): Promise
<null
| string
>
Parameters
Name | Type |
---|---|
channelName | string |
Returns
Promise
<null
| string
>
Defined in
packages/pvm-mattermost/lib/index.ts:52
getMessageWithDefaults
â–¸ getMessageWithDefaults(message
): Message
Parameters
Name | Type |
---|---|
message | Message |
Returns
Inherited from
AbstractMessengerClient.getMessageWithDefaults
Defined in
packages/pvm-notifications/lib/abstract-messenger-client.ts:11
getSelfId
â–¸ getSelfId(): Promise
<null
| string
>
Returns
Promise
<null
| string
>
Defined in
packages/pvm-mattermost/lib/index.ts:24
getUserIdFromUserName
â–¸ getUserIdFromUserName(userName
): Promise
<string
>
Parameters
Name | Type |
---|---|
userName | string |
Returns
Promise
<string
>
Defined in
packages/pvm-mattermost/lib/index.ts:38
internalSendMessage
â–¸ Protected
internalSendMessage(message
): Promise
<void
>
Internal method for sending messages. Message here already populated with all sorts of defaults.
Channel and content here are mandatory. This is checked in AbstractMessengerClient.sendMessage
Parameters
Name | Type |
---|---|
message | Message & { channel : string ; content : string } |
Returns
Promise
<void
>
Overrides
AbstractMessengerClient.internalSendMessage
Defined in
packages/pvm-mattermost/lib/index.ts:102
isReady
â–¸ isReady(): boolean
Returns
boolean
Overrides
AbstractMessengerClient.isReady
Defined in
packages/pvm-mattermost/lib/index.ts:13
requestApi
â–¸ requestApi(__namedParameters
): Promise
<any
>
Parameters
Name | Type |
---|---|
__namedParameters | Object |
__namedParameters.body? | Record <string , any > |
__namedParameters.method | "GET" | "POST" |
__namedParameters.path | string |
Returns
Promise
<any
>
Defined in
packages/pvm-mattermost/lib/index.ts:133
requestWithRetries
â–¸ requestWithRetries(requestFn
): Promise
<any
>
Parameters
Name | Type |
---|---|
requestFn | () => Promise <any > |
Returns
Promise
<any
>
Defined in
packages/pvm-mattermost/lib/index.ts:149
sendMessage
â–¸ sendMessage(message
): Promise
<void
>
Parameters
Name | Type |
---|---|
message | Message |
Returns
Promise
<void
>
Inherited from
AbstractMessengerClient.sendMessage
Defined in
packages/pvm-notifications/lib/abstract-messenger-client.ts:22