コード例 #1
0
 public CommunityRunnable(ILogger <CommunityRunnable> logger, ISeenItemRepository seenItemRepository, HttpClient httpClient, Function.FunctionConfig config, Scraper scraper)
 {
     slack = new SlackClient(new SlackConfig {
         WebHookUrl = config.EstrangedDiscordCommunityWebhook, HttpClient = httpClient
     });
     this.scraper = scraper;
 }
コード例 #2
0
 public SlackUserAvatar(ISecrets secrets, IPokerRepository pokerRepository, PokerDBContext pokerDBContext, ISlackClient slackClient)
 {
     _secrets     = secrets;
     _pokerRepo   = pokerRepository;
     _pokerDB     = pokerDBContext;
     _slackClient = slackClient;
 }
コード例 #3
0
 public AnswerMessageActionExecutor(
     ISlackClient slackClient,
     string value)
 {
     _slackClient = slackClient;
     _value       = value;
 }
コード例 #4
0
 public SubscriptionCleaner(ILogger <SubscriptionCleaner> logger, IAzure azureConnection, ISlackClient slackClient, CleanupConfiguration cleanupConfiguration)
 {
     _logger               = logger ?? throw new ArgumentNullException(nameof(logger));
     _azureConnection      = azureConnection ?? throw new ArgumentNullException(nameof(azureConnection));
     _slackClient          = slackClient ?? throw new ArgumentNullException(nameof(slackClient));
     _cleanupConfiguration = cleanupConfiguration ?? throw new ArgumentNullException(nameof(cleanupConfiguration));
 }
コード例 #5
0
 public DeleteResponse(ISlackClient client) : base(client)
 {
     DeleteRegexs = new List <DeleteResponseEntry>();
     DeleteRegexs.Add(new DeleteResponseEntry(@"(ur|y..r|'s)\s*(m.m|m..h.r|m.t.rnal)+"));
     DeleteRegexs.Add(new DeleteResponseEntry(@"(m.m|m..h.r|m.t.rnal)'?s (box|face|butt|ass|c**t)"));
     DeleteRegexs.Add(new DeleteResponseEntry(@"(schl...)|(fourth leg)|(fifth leg)"));
 }
コード例 #6
0
 public ScopedBalance(ISecrets secrets, IPokerRepository pokerRepository, PokerDBContext pokerDBContext, ISlackClient slackClient)
 {
     _secrets     = secrets;
     _pokerRepo   = pokerRepository;
     _pokerDB     = pokerDBContext;
     _slackClient = slackClient;
 }
コード例 #7
0
 public BountyController(ApplicationDbContext context, ILogger <CabinetController> logger, ISlackClient slackClient, UserManager <ApplicationUser> userManager)
     : base(context)
 {
     _logger      = logger;
     _slackClient = slackClient;
     _userManager = userManager;
 }
コード例 #8
0
        public void SetUp()
        {
            var token          = ConfigurationManager.AppSettings["userToken"];
            var clientSettings = new ClientSettings(token);

            SUT = new Nuget.SlackClient.Services.SlackClient(clientSettings);
        }
コード例 #9
0
ファイル: Setup.cs プロジェクト: slackbot-net/Slackbot.Net
        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";
        }
コード例 #10
0
 public HappyBirthday(Smartinger smartinger, SlackChannels channels, ISlackClient client)
 {
     _smartinger = smartinger;
     _channels   = channels;
     _client     = client;
     _timing     = new Timing();
 }
コード例 #11
0
 public ConferenceService(string[] conferenceIds, Dictionary <string, Conference> conferences, ThumbnailService thumbnailService, ConferencePersistence conferencePersistence, ISlackClient slackClient)
 {
     this.conferenceIds         = conferenceIds;
     this.conferences           = conferences;
     this.thumbnailService      = thumbnailService;
     this.conferencePersistence = conferencePersistence;
     this.slackClient           = slackClient;
 }
コード例 #12
0
 public SpeakerService(string[] conferenceIds, Dictionary <string, Conference> conferences, Users users, ConferencePersistence conferencePersistence, ThumbnailService thumbnailService, ISlackClient slackClient)
     : base(conferenceIds, conferences, thumbnailService, conferencePersistence, slackClient)
 {
     this.conferenceIds         = conferenceIds;
     this.users                 = users;
     this.conferencePersistence = conferencePersistence;
     this.slackClient           = slackClient;
 }
コード例 #13
0
ファイル: SlackStartup.cs プロジェクト: zeppu/shipbot
 public SlackStartup(
     IOptions <SlackConfiguration> slackConfiguration,
     ISlackClient slackClient
     )
 {
     _slackConfiguration = slackConfiguration;
     _slackClient        = slackClient;
 }
コード例 #14
0
 public StorsdagInviter(IEventsStorage eventStorage, IInvitationsStorage inviteStorage, ISlackClient slackClient, SlackQuestionClient questioner, ILogger <StorsdagInviter> logger)
 {
     _eventStorage  = eventStorage;
     _inviteStorage = inviteStorage;
     _slackClient   = slackClient;
     _questioner    = questioner;
     _logger        = logger;
 }
コード例 #15
0
 public HomeController(ILogger <HomeController> logger, IPokerRepository PokerRepository, ISecrets Secrets, ISlackClient SlackClient, IGameState GameState)
 {
     _logger          = logger;
     _pokerRepository = PokerRepository;
     _secrets         = Secrets;
     _slackClient     = SlackClient;
     _gameState       = GameState;
 }
コード例 #16
0
        public HubPageViewModel(ISlackClient slackClient, ISettings settings)
        {
            _slackClient = slackClient;
            _settings    = settings;

            Channels   = new ObservableCollection <SlackItem>();
            ImChannels = new ObservableCollection <SlackItem>();
        }
コード例 #17
0
ファイル: TalkService.cs プロジェクト: Sankra/MediaServer
 public TalkService(TalkPersistence talkPersistence, Users users, ContentService contentService, ThumbnailService thumbnailService, ISlackClient slackClient)
 {
     this.talkPersistence  = talkPersistence;
     this.users            = users;
     this.contentService   = contentService;
     this.thumbnailService = thumbnailService;
     this.slackClient      = slackClient;
 }
コード例 #18
0
        protected override async Task <IMessageProcessor> Given()
        {
            _company = string.Format("comapy{0}", Fixture.Create <string>());
            _token   = string.Format("token{0}", Fixture.Create <string>());
            _client  = Fixture.Freeze <ISlackClient>();

            return(new MessageProcessor(_container, _client));
        }
コード例 #19
0
    public PublishViaWebHookCommandHandler(IConfiguration config, ISlackClientBuilder builder)
    {
        var token = config.GetValue <string>("SlackToken_FplBot_Workspace");
        var env   = config.GetValue <string>("DOTNET_ENVIRONMENT");

        _prefix = env == "Production" ? "" : $"{env}: ";
        _client = builder.Build(token);
    }
コード例 #20
0
 public DeployToClusterCommandHandler(
     IProvisioningService provisioningService,
     IMediator mediator,
     ISlackClient slackClient)
 {
     this.provisioningService = provisioningService;
     this.mediator            = mediator;
     this.slackClient         = slackClient;
 }
コード例 #21
0
        public IndexModule(IBuildSlackMessages slackMessageBuilder,
            ISlackClient slackClient)
        {
            _slackMessageBuilder = slackMessageBuilder;
            _slackClient = slackClient;

            Get["/"] = _ => "pong";
            Post["/"] = _ => PostAlert();
        }
コード例 #22
0
        public SlackMessageHandler(ISlackClient slack)
        {
            if (slack == null)
            {
                throw new ArgumentNullException("slack");
            }

            _slack = slack;
        }
コード例 #23
0
        /// <summary>
        /// Constructs an instance with a preconfigured S3 client. This can be used for testing the outside of the Lambda environment.
        /// </summary>
        /// <param name="amazonS3Client"></param>
        /// <param name="slackClient"></param>
        /// <param name="webHookUri"></param>
        /// <param name="message"></param>
        public AWSS3EventNotification(IAmazonS3 amazonS3Client, ISlackClient slackClient, Uri webHookUri, SlackMessage message)
        {
            _amazonS3Client = amazonS3Client;
            _slackClient    = slackClient;
            _webHookUri     = webHookUri;
            _message        = message;

            _log.DebugFormat("In S3EventNotification parameterized constructor, initialized S3 client instance");
        }
コード例 #24
0
 public HomeController(ApplicationDbContext context,
                       IStringLocalizer <HomeController> localizer,
                       IEmailSender emailSender,
                       ISlackClient slack)
 {
     _context     = context;
     _localizer   = localizer;
     _emailSender = emailSender;
     _slack       = slack;
 }
コード例 #25
0
 public AppMentionHandler(
     ISlackClient slackClient,
     ISlackCommandDispatcher slackCommandDispatcher,
     ISlackApiClient slackApiClient
     )
 {
     _slackClient            = slackClient;
     _slackCommandDispatcher = slackCommandDispatcher;
     _slackApiClient         = slackApiClient;
 }
コード例 #26
0
ファイル: HelpHandler.cs プロジェクト: gertjvr/TeamBot
        public HelpHandler(ISlackClient slack, ILifetimeScope scope)
            : base(slack)
        {
            if (scope == null)
            {
                throw new ArgumentNullException("scope");
            }

            _scope = scope;
        }
コード例 #27
0
        public async Task <IActionResult> Post([FromServices] ISlackClient slackClient, [FromForm] SlackRequest slackRequest, CancellationToken cancellationToken)
        {
            await slackClient.PostOnChannelAsync(slackRequest.TeamDomain, slackRequest.ChannelId, "command [list]", cancellationToken);

            return(Ok(new SlackResponse
            {
                ResponseType = SlackResponseType.InChannel,
                Text = "teste"
            }));
        }
コード例 #28
0
 public GetCurrentApplicationTags(
     IApplicationService applicationService,
     IApplicationImageInstanceService applicationImageInstanceService,
     ISlackClient slackClient
     )
 {
     _applicationService = applicationService;
     _applicationImageInstanceService = applicationImageInstanceService;
     _slackClient = slackClient;
 }
コード例 #29
0
ファイル: DeploymentService.cs プロジェクト: zeppu/shipbot
 public DeploymentService(
     ILogger <DeploymentService> log,
     IApplicationService applicationService,
     ISlackClient slackClient
     )
 {
     _log = log;
     _applicationService = applicationService;
     _slackClient        = slackClient;
 }
コード例 #30
0
 public HomeController(TokenSaleContract contract,
                       ApplicationDbContext context,
                       IEmailSender emailSender,
                       ISlackClient slack)
 {
     _contract    = contract;
     _context     = context;
     _emailSender = emailSender;
     _slack       = slack;
 }
コード例 #31
0
        public TeamCityHandler(ISlackClient slack, ITeamCityClient client)
            : base(slack)
        {
            if (client == null)
            {
                throw new ArgumentNullException("client");
            }

            _client = client;
        }
コード例 #32
0
 public AllUsersViewModel(ISlackClient slack)
 {
     _slack = slack;
 }
コード例 #33
0
ファイル: SlackOutput.cs プロジェクト: ZiedBeta/LinkCrawler
 public SlackOutput(ISlackClient slackClient)
 {
     _slackClient = slackClient;
 }
コード例 #34
0
 public WebHookExceptionReporter(ISlackClient client)
 {
     _client = client;
 }
コード例 #35
0
 public UserDetailsViewModel(ISlackClient slack, IImageCache imageCache)
 {
     _slack = slack;
     _imageCache = imageCache;
 }
コード例 #36
0
 /// <summary>
 /// Creates a new instance of the exception filter with optional arguments.
 /// </summary>
 /// <param name="options">The options for configuring the webhook.</param>
 /// <param name="client">The webhook client to use for posting the error report messages. 
 /// If no options are provided here, they will need to be provided by an OnExceptionReporting handler.</param>
 public WebHookErrorReportFilter(WebHookOptions options = null, ISlackClient client = null)
 {
     Options = options;
     _client = client;
     ThrowOnFailure = true;
 }