com.ullink.slack.simpleslackapi.SlackSession Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of simpleslackapi-lib Show documentation
Show all versions of simpleslackapi-lib Show documentation
A simple API to build bot running on Slack
The newest version!
package com.ullink.slack.simpleslackapi;
import java.io.IOException;
import java.util.Collection;
import java.util.Map;
import com.ullink.slack.simpleslackapi.impl.SlackChatConfiguration;
import com.ullink.slack.simpleslackapi.listeners.PinAddedListener;
import com.ullink.slack.simpleslackapi.listeners.PinRemovedListener;
import com.ullink.slack.simpleslackapi.listeners.ReactionAddedListener;
import com.ullink.slack.simpleslackapi.listeners.ReactionRemovedListener;
import com.ullink.slack.simpleslackapi.listeners.SlackChannelArchivedListener;
import com.ullink.slack.simpleslackapi.listeners.SlackChannelCreatedListener;
import com.ullink.slack.simpleslackapi.listeners.SlackChannelDeletedListener;
import com.ullink.slack.simpleslackapi.listeners.SlackChannelRenamedListener;
import com.ullink.slack.simpleslackapi.listeners.SlackChannelUnarchivedListener;
import com.ullink.slack.simpleslackapi.listeners.SlackConnectedListener;
import com.ullink.slack.simpleslackapi.listeners.SlackGroupJoinedListener;
import com.ullink.slack.simpleslackapi.listeners.SlackMessageDeletedListener;
import com.ullink.slack.simpleslackapi.listeners.SlackMessagePostedListener;
import com.ullink.slack.simpleslackapi.listeners.SlackMessageUpdatedListener;
import com.ullink.slack.simpleslackapi.listeners.SlackUserChangeListener;
import com.ullink.slack.simpleslackapi.replies.GenericSlackReply;
import com.ullink.slack.simpleslackapi.replies.ParsedSlackReply;
import com.ullink.slack.simpleslackapi.replies.SlackChannelReply;
import com.ullink.slack.simpleslackapi.replies.SlackMessageReply;
public interface SlackSession {
Collection getChannels();
Collection getUsers();
Collection getBots();
SlackChannel findChannelByName(String channelName);
SlackChannel findChannelById(String channelId);
SlackUser findUserById(String userId);
SlackUser findUserByUserName(String userName);
SlackUser findUserByEmail(String userMail);
SlackPersona sessionPersona();
@Deprecated
SlackBot findBotById(String botId);
SlackMessageHandle inviteUser(String email, String firstName, boolean setActive);
void connect() throws IOException;
void disconnect() throws IOException;
SlackMessageHandle deleteMessage(String timeStamp, SlackChannel channel);
SlackMessageHandle sendMessage(SlackChannel channel, String message, SlackAttachment attachment, SlackChatConfiguration chatConfiguration, boolean unfurl);
SlackMessageHandle sendMessage(SlackChannel channel, String message, SlackAttachment attachment, SlackChatConfiguration chatConfiguration);
SlackMessageHandle sendMessage(SlackChannel channel, String message, SlackAttachment attachment, boolean unfurl);
SlackMessageHandle sendMessage(SlackChannel channel, String message, SlackAttachment attachment);
SlackMessageHandle sendMessage(SlackChannel channel, String message, boolean unfurl);
SlackMessageHandle sendMessage(SlackChannel channel, String message);
SlackMessageHandle sendMessageToUser(SlackUser user, String message, SlackAttachment attachment);
SlackMessageHandle sendMessageToUser(String userName, String message, SlackAttachment attachment);
SlackMessageHandle updateMessage(String timeStamp, SlackChannel channel, String message);
SlackMessageHandle sendMessageOverWebSocket(SlackChannel channel, String message);
SlackMessageHandle addReactionToMessage(SlackChannel channel, String messageTimeStamp, String emojiCode);
SlackMessageHandle joinChannel(String channelName);
SlackMessageHandle leaveChannel(SlackChannel channel);
SlackMessageHandle inviteToChannel(SlackChannel channel, SlackUser user);
SlackMessageHandle archiveChannel(SlackChannel channel);
SlackMessageHandle openDirectMessageChannel(SlackUser user);
SlackMessageHandle openMultipartyDirectMessageChannel(SlackUser... users);
SlackPersona.SlackPresence getPresence(SlackPersona persona);
SlackMessageHandle postGenericSlackCommand(Map params, String command);
void addchannelArchivedListener(SlackChannelArchivedListener listener);
void removeChannelArchivedListener(SlackChannelArchivedListener listener);
void addchannelCreatedListener(SlackChannelCreatedListener listener);
void removeChannelCreatedListener(SlackChannelCreatedListener listener);
void addchannelDeletedListener(SlackChannelDeletedListener listener);
void removeChannelDeletedListener(SlackChannelDeletedListener listener);
void addChannelRenamedListener(SlackChannelRenamedListener listener);
void removeChannelRenamedListener(SlackChannelRenamedListener listener);
void addChannelUnarchivedListener(SlackChannelUnarchivedListener listener);
void removeChannelUnarchivedListener(SlackChannelUnarchivedListener listener);
void addMessageDeletedListener(SlackMessageDeletedListener listener);
void removeMessageDeletedListener(SlackMessageDeletedListener listener);
void addMessagePostedListener(SlackMessagePostedListener listener);
void removeMessagePostedListener(SlackMessagePostedListener listener);
void addMessageUpdatedListener(SlackMessageUpdatedListener listener);
void removeMessageUpdatedListener(SlackMessageUpdatedListener listener);
void addGroupJoinedListener(SlackGroupJoinedListener listener);
void removeGroupJoinedListener(SlackGroupJoinedListener listener);
/*
* Subscribe to events related to the actions to the slack
* server. At this time a set of status information is exchanged that
* is useful to implementing bots.
*
* For example, the current user that is connecting.
* knowing your own user id will help you stop answering your own
* questions.
*/
void addSlackConnectedListener(SlackConnectedListener listner);
void removeSlackConnectedListener(SlackConnectedListener listener);
/**
*
* @return true if actions is open
*/
boolean isConnected();
void addReactionAddedListener(ReactionAddedListener listener);
void removeReactionAddedListener(ReactionAddedListener listener);
void addReactionRemovedListener(ReactionRemovedListener listener);
void removeReactionRemovedListener(ReactionRemovedListener listener);
void addSlackUserChangeListener(SlackUserChangeListener listener);
void removeSlackUserChangeListener(SlackUserChangeListener listener);
void addPinAddedListener(PinAddedListener listener);
void removePinAddedListener(PinAddedListener listener);
void addPinRemovedListener(PinRemovedListener listener);
void removePinRemovedListener(PinRemovedListener listener);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy