Created
October 11, 2018 10:08
-
-
Save shestakow1993/6b5c403badf405ae01084dbea251ed7e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Sends notifications with params from enum @SlackChats.class | |
*/ | |
public class Notification { | |
/** | |
* | |
* @param message string messages text | |
* @param slackChats CONSTANT from SlackChat | |
*/ | |
public static void sendMessage(String message, SlackChats slackChats){ | |
SlackApi api = new SlackApi(slackChats.getAddress()); | |
try { | |
api.call(new SlackMessage(message)); | |
}catch (IOException e) { | |
System.out.println(message + " message don't send slack"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment