TTMSFNCCloudSlack
Usage
A component that provides access to the Slack service. It allows users to extend and expand the capabilities of your Slack workspace. Cultivate conversation, customize functionality, or integrate ingenious services by building an app.
Client ID, Client Secret, CallBack URL
(The CallBack URL must also be set in the settings on the website.)
Properties
Property name |
Description |
CurrentUserName: String |
The username of the user that has authenticated. |
CurrentUserID: String |
The ID of the user that has authenticated. |
Users: TTMSFNCCloudSlackUsers [TTMSFNCCloudSlackUser] |
Contains the members of your Slack team. Every user has an Profile object of the type TTMSFNCCloudSlackProfile |
Conversations: TTMSFNCCloudSlackConversations [TTMSFNCCloudSlackConversation] |
Contains the different public and private channels, direct messages and group direct messages. Every conversation has an object list Messages of the type TTMSFNCCloudSlackMessages that contains different TTMSFNCCloudSlackMessage objects these are the messages posted in the different channels. These in turn have the possibility to also contain ‘Replies’ and‘Files’ . |
ProfileImageSize: TTMSFNCCloudSlackProfileImageSizes |
You can select on which size the profile pictures get downloaded. By default this is set to sizOriginal which gets the original size. Other possible values are: siz24 , siz32 , siz48 , siz72 , siz192 , siz512 . |
Methods
Method name |
Description |
GetConversations/GetAllConversations |
Retrieve (all) the conversations in the team. The procedure fills the Conversations (TTMSFNCCloudSlackConversations ) property. |
GetUsers/GetAllUsers |
Retrieve (all) the users in the team. The procedure fills the Users (TTMSFNCCloudSlackUsers ) property. |
GetUserInformation |
Retrieve the information for the requested user in the team. The procedure fills the Users (TTMSFNCCloudSlackUsers ) property with the chosen user if it doesn’ exist. The required parameter for the method is the UserID (String ). |
GetConversationHistory/GetAllConversationHistory |
Retrieve the messages for the requested user in the team. The procedure fills the Messages (TTMSFNCCloudSlackMessages ) property of the chosen conversation. The required parameter for the method is the Conversation (TTMSFNCCloudSlackConversation ) or the ConversationID (String ) |
UploadFile |
Uploads a file to your slack. The procedure creates a slack file object (TTMSFNCCloudSlackFile ). The required parameter for the method is the FNC file (TTMSFNCUtilsFile ). |
PostMessage |
Adds a message to the selected conversation. The procedure adds the create message to the Messages (TTMSFNCCloudSlackMessages ) property of the chosen conversation. The required parameter for the method is the Conversation (TTMSFNCCloudSlackConversation ) or the ConversationID (String ) and the text of the message (String ). |
JoinConversation |
Tries to add the the authenticated user to a conversation. The required parameter for the method is the Conversation (TTMSFNCCloudSlackConversation ) or the ConversationID (String ). |
GetUserConversations/GetAllUserConversations |
Retrieve (all) the conversations for a specific user. The procedure fills the Conversations (TTMSFNCCloudSlackConversations ) property. The required parameter for the method is the User (TTMSFNCCloudSlackUser ) UserID (String ). |
DeleteMessage |
Removes a message from the selected conversation. The procedure removes the message from the Messages (TTMSFNCCloudSlackMessages ) property of the chosen conversation. The required parameter for the method is the message (TTMSFNCCloudSlackMessage ) |
GetMessageReplies/ GetAllMessageReplies |
Retrieve (all) the replies from a specific messega. The procedure fills the Replies (TTMSFNCCloudSlackReplies ) property from a message (TTMSFNCCloudSlackMessage ). The required parameter for the method is the Message (TTMSFNCCloudSlackMessage ). |
DownloadFile |
Downloads the content of a slack file. The procedure fills the stream (TMemoryStream ) property from a file (TTMSFNCCloudSlackFile ). The required parameter for the method is the file (TTMSFNCCloudSlackFile ). |
PostReply |
Adds a reply to the selected message thread. The procedure adds the created reply to the Replies (TTMSFNCCloudSlackReplies ) property of the chosen message. The required parameter for the method is the Message (TTMSFNCCloudSlackMessage ) and the text of the reply (String ). |
DownloadProfilePicture |
Downloads the content of a slack profile picture. The procedure fills the profilepicturestream (TMemoryStream ) property from a file (TTMSFNCCloudSlackFile ). The required parameter for the method is the User (TTMSFNCCloudSlackUser ), the UserID (String ) or the user profile (TTMSFNCCloudSlackUserProfile ). |
Events
Event name |
Description |
OnGetConversations/OnGetAllConversations |
Event fired when the/all requested conversations are retrieved. This event returns additional to the sender and the request result also the list of conversations(TTMSFNCCloudSlackConversations ) and the possible ErrorMessage (String ). |
OnGetConversationHistory/ OnGetAllConversationHistory |
Event fired when the/all requested messages of the chosen conversation are retrieved. This event returns additional to the sender and the request result also the chosen conversations (TTMSFNCCloudSlackConversation ), the requested messages (TTMSFNCCloudSlackMessages ) and the possible ErrorMessage (String ). |
OnGetUsers/OnGetAllUsers |
Event fired when the/all requested users are retrieved. This event returns additional to the sender and the request result also the list of users (TTMSFNCCloudSlackUsers ) and the possible ErrorMessage (String ). |
OnGetFile |
Event fired when the requested file is retrieved. This event returns additional to the sender and the request result also the message of the file (TTMSFNCCloudSlackMessage ), the requested file(TTMSFNCCloudSlackFile ), the stream of the file (TMemoryStream ) and the possible ErrorMessage (String ). |
OnPostMessage |
Event fired when the created message is added to the conversation. This event returns additional to the sender and the request result also the conversation in which the message was added (TTMSFNCCloudSlackConversation ), the message itself (TTMSFNCCloudSlackMessage ) and the possible ErrorMessage (String ). |
OnUploadFile |
Event fired when the file is uploaded to the chosen conversations. This event returns additional to the sender and the request result also the file itself (TTMSFNCCloudSlackFile ) and the possible ErrorMessage (String ). |
OnJoinConversation |
Event fired when a user is added as a member of a channel. This event returns additional to the sender and the request result also a Boolean if the user was added or not, the requested conversation (TTMSFNCCloudSlackConversation ), a possible WarningMessage (String ) and the possible ErrorMessage (String ). |
OnGetProfilePicture |
Event fired when the picture of the requested profile is retrieved. This event returns additional to the sender and the request result also the user (TTMSFNCCloudSlackUser ), the profile (TTMSFNCCloudSlackProfile ), the stream of the picture (TMemoryStream ) and the possible ErrorMessage (String ). |
OnGetUserConverasations/OnGetAllUserConversations |
Event fired when the/all requested conversations of which the user is a member of are retrieved. This event returns additional to the sender and the request result also the list of conversations (TTMSFNCCloudSlackConversations ), the user that is a member of the conversations(TTMSFNCCloudSlackUser ) and the possible ErrorMessage (String ). |
OnDeleteMessage |
Event fired when the message was deleted in a conversation. This event returns additional to the sender and the request result also a Boolean that indicates if the message was deleted or not, the conversation in which the message was deleted (TTMSFNCCloudSlackConversation ) and the possible ErrorMessage (String ). |
OnGetMessageReplies/OnGetAllMessageReplies |
Event fired when the/all requested replies of the chosen message are retrieved. This event returns additional to the sender and the request result also the chosen message (TTMSFNCCloudSlackMessage ) and the possible ErrorMessage (String ). |
OnPostReply |
Event fired when the created reply is added to the message thread. This event returns additional to the sender and the request result also the message in which the reply was added (TTMSFNCCloudSlackMessage ), the reply itself (TTMSFNCCloudSlackReply ) and the possible ErrorMessage (String ). |
OnGetUserInformation |
Event fired when the requested user is retrieved. This event returns additional to the sender and the request result also the user (TTMSFNCCloudSlackUser ) and the possible ErrorMessage (String ). |