• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java SlackClientFactory类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中allbegray.slack.SlackClientFactory的典型用法代码示例。如果您正苦于以下问题:Java SlackClientFactory类的具体用法?Java SlackClientFactory怎么用?Java SlackClientFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

SlackClientFactory类属于allbegray.slack包,在下文中一共展示了SlackClientFactory类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: notify

点赞 3

import allbegray.slack.SlackClientFactory; //导入依赖的package包/类
@Override
protected void notify(Parameters parameters) throws NotificationException {
    SubnodeConfiguration config = retrieveTeamInformation();

    if (config == null) {
        throw new NotificationException("Invalid configuration");
    }

    SlackWebApiClient slackClient =
            SlackClientFactory.createWebApiClient(config.getString("accessToken"));

    ChatPostMessageMethod chatPostMessageMethod =
            new ChatPostMessageMethod(channel, message);
    chatPostMessageMethod.setAs_user(true);

    slackClient.postMessage(chatPostMessageMethod);

    log.info("https://" + config.getString("teamName") + ".slack.com/messages/" + channel + "/");
}
 

开发者ID:yfiton,
项目名称:yfiton,
代码行数:20,
代码来源:SlackNotifier.java

示例2: setUp

点赞 2

import allbegray.slack.SlackClientFactory; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
    String token = System.getenv().get("auth_token");
    assertNotNull(token);

    webApiClient = SlackClientFactory.createWebApiClient(token);
}
 

开发者ID:allbegray,
项目名称:slack-api,
代码行数:8,
代码来源:RemindersTest.java

示例3: getChannelList

点赞 2

import allbegray.slack.SlackClientFactory; //导入依赖的package包/类
@Override
public Map<String, String> getChannelList(String slackToken) {
    SlackWebApiClient webApiClient = SlackClientFactory.createWebApiClient(slackToken);
    List<Channel> channelList = webApiClient.getChannelList();
    return channelList.stream().collect(Collectors.toMap(c -> c.getId(), c -> c.getName()));
}
 

开发者ID:BBVA,
项目名称:mirrorgate,
代码行数:7,
代码来源:SlackServiceImpl.java

示例4: setup

点赞 2

import allbegray.slack.SlackClientFactory; //导入依赖的package包/类
@Before
public void setup() {
    webApiClient = SlackClientFactory.createWebApiClient(token);
}
 

开发者ID:allbegray,
项目名称:slack-api,
代码行数:5,
代码来源:BotsTest.java

示例5: setup

点赞 2

import allbegray.slack.SlackClientFactory; //导入依赖的package包/类
@Before
public void setup() {
	webApiClient = SlackClientFactory.createWebApiClient(token);
}
 

开发者ID:allbegray,
项目名称:slack-api,
代码行数:5,
代码来源:DndMethodTest.java

示例6: webClient

点赞 1

import allbegray.slack.SlackClientFactory; //导入依赖的package包/类
/**
 * Convenience method to create an authorized web API client.
 *
 * @return Slack web client
 */
private SlackWebApiClient webClient() {
    return SlackClientFactory.createWebApiClient(
            ConfigurationHolder.get().getSlackConfig().getBotToken());
}
 

开发者ID:PaperCutSoftware,
项目名称:dust-api,
代码行数:10,
代码来源:SlackIntegration.java

示例7: rtmClient

点赞 1

import allbegray.slack.SlackClientFactory; //导入依赖的package包/类
/**
 * Convenience method to create an authorized RTM client.
 *
 * @return Slack RTM client
 */
private SlackRealTimeMessagingClient rtmClient() {
    return SlackClientFactory.createSlackRealTimeMessagingClient(
            ConfigurationHolder.get().getSlackConfig().getBotToken());
}
 

开发者ID:PaperCutSoftware,
项目名称:dust-api,
代码行数:10,
代码来源:SlackIntegration.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)