internal SlackWebApiClient(string token, ISlackConnector connector) { Chat = new ChatSlackModule(token, connector); Groups = new GroupsSlackModule(token, connector); Users = new UsersSlackModule(token, connector); DirectMessages = new DirectMessagesModule(token, connector); }
public SlackService(string key) { _key = key; _connector = new SlackConnector.SlackConnector(); _responders = ResponseBuilder.GetResponders(); }
public SlackBotServer(string apiToken) { _apiToken = apiToken; _connector = new SlackConnector.SlackConnector(); _chatBot = IocContainer.Instance.Resolve<IChatBot>(); _isConnected = false; }
public async Task StartAsync(CancellationToken cancellationToken) { connector = new SlackConnector.SlackConnector(); var accessToken = AmbientConnectionStringProvider.Instance.GetConnectionString(attribute.AccessToken); connection = await connector.Connect(accessToken); connection.OnMessageReceived += ConnectionOnOnMessageReceived; connection.OnDisconnect += ConnectionOnOnDisconnect; }
public async Task Connect() { var config = _configReader.GetConfig(); _client = new SlackConnector.SlackConnector(); _client.OnMessageReceived += MessageReceived; _client.OnConnectionStatusChanged += ConnectionStatusChanged; await _client.Connect(config.Slack.ApiToken); }
/// <summary> /// Constructor. /// </summary> /// <param name="connector">The Slack connector to use.</param> /// <param name="slackKey">The Slack key to use.</param> public SlackIntegration(ISlackConnector connector, string slackKey) { this.connector = connector ?? throw new ArgumentNullException(nameof(connector)); if (string.IsNullOrEmpty(slackKey)) { throw new ArgumentException(nameof(slackKey)); } this.slackKey = slackKey; }
public App( IRestClient client, IEnvironmentVariableReader envReader, ISlackConnector slack, ISecretHandler secretHandler, int timeout = 5000 ) { _client = client; _envReader = envReader; _slack = slack; _secretHandler = secretHandler; _timeout = timeout; }
public SlackIntegrationTests(ITestOutputHelper output) { _output = output; connector = new SlackConnector.SlackConnector(); }
internal SlackModule(string token, ISlackConnector connector) { _token = token; _connector = connector; }
public SlackIntegration(ISlackConnector connector, IAppConfig config) { this.connector = connector ?? throw new ArgumentNullException(nameof(connector)); slackAPIToken = config.SlackAPIToken; }
public GroupsSlackModule(string token, ISlackConnector connector) : base(token, connector) { }
public ChatSlackModule(string token, ISlackConnector connector) : base(token, connector) { }
public SlackService(ISlackConnector connector, ISlackConfig config) { this.connector = connector; this.config = config; }
public Tester(string slackToken) { _firstStart = true; _slackToken = slackToken; _slackBot = new SlackConnector.SlackConnector(); }
public DirectMessagesModule(string token, ISlackConnector connector) : base(token, connector) { }