public OAuthController(ILogger <OAuthController> logger, ISlackOAuthAccessClient oAuthAccessClient, ISlackTeamRepository slackTeamRepository, IOptions <DistributedSlackAppOptions> options) { _logger = logger; _oAuthAccessClient = oAuthAccessClient; _slackTeamRepository = slackTeamRepository; _options = options; }
public Setup(ITestOutputHelper helper) { var services = new ServiceCollection(); services.AddSlackbotOauthClient(c => { c.OauthToken = Environment.GetEnvironmentVariable("Slackbot_SlackApiKey_SlackApp"); }); services.AddSlackHttpClient(c => { c.BotToken = Environment.GetEnvironmentVariable("Slackbot_SlackApiKey_BotUser"); }); services.AddSlackbotOauthAccessHttpClient(); services.AddSingleton <ILogger <ISlackClient> >(new XUnitLogger <ISlackClient>(helper)); var provider = services.BuildServiceProvider(); SearchClient = provider.GetService <ISearchClient>(); SlackClient = provider.GetService <ISlackClient>(); SlackOAuthClient = provider.GetService <ISlackOAuthAccessClient>(); Channel = "#testss"; Text = "Test"; }
public OAuthController(ILogger <OAuthController> logger, ISlackOAuthAccessClient oAuthAccessClient, ISlackTeamRepository slackTeamRepository, ILeagueClient leagueClient, IOptions <OAuthOptions> options, IMessageSession messageSession, IWebHostEnvironment env) { _logger = logger; _oAuthAccessClient = oAuthAccessClient; _slackTeamRepository = slackTeamRepository; _leagueClient = leagueClient; _options = options; _messageSession = messageSession; _env = env; }