Ejemplo n.º 1
0
 public static Task <ChatMessageResponse> ChatPostMessage(this ISlackAPI client, string channel, string text)
 {
     return(client.ChatPostMessage(new ChatMessage
     {
         channel = channel,
         text = text
     }));
 }
Ejemplo n.º 2
0
 public QueueProcessor(
     IQueue queue,
     INotifier notifier,
     IProductAnalyticsAPIClient productAnalyticsAPIClient,
     ICache persister,
     IUDRData udrData,
     HttpClient httpClient,
     string bearerToken,
     ISlackAPI slack,
     IHeadtoHeadAPIClient headToHeadAPIClient
     )
 {
     this.queue    = queue ?? throw new ArgumentNullException("queue");
     this.notifier = notifier ?? throw new ArgumentNullException("notifier");;
     this.productAnalyticsAPIClient = productAnalyticsAPIClient ?? throw new ArgumentNullException("productAnalyticsAPIClient");
     this.persister           = persister ?? throw new ArgumentNullException("persister");
     this.udrData             = udrData ?? throw new ArgumentNullException("udrData");
     this.bearerToken         = bearerToken ?? throw new ArgumentNullException("bearerToken");
     this.httpClient          = httpClient ?? throw new ArgumentNullException("httpClient");
     this.bearerToken         = bearerToken;
     this.slack               = slack ?? throw new ArgumentNullException("slack");
     this.headToHeadAPIClient = headToHeadAPIClient ?? throw new ArgumentNullException("headToHeadAPIClient");
 }
Ejemplo n.º 3
0
 public Engine(
     IQueue queue,
     INotifier notifier,
     IProductAnalyticsAPIClient productAnalyticsAPIClient,
     ICache persister,
     IUDRData udrData,
     IHttpClientFactory httpClientFactory,
     IOAuthClient oauthClient,
     IEncryptedEnvVariable decryptVariable,
     ISlackAPI slack,
     IHeadtoHeadAPIClient headToHeadAPIClient
     )
 {
     this.queue    = queue ?? throw new ArgumentNullException("queue");
     this.notifier = notifier ?? throw new ArgumentNullException("notifier");
     this.productAnalyticsAPIClient = productAnalyticsAPIClient ?? throw new ArgumentNullException("productAnalyticsAPIClient");
     this.persister           = persister ?? throw new ArgumentNullException("persister");
     this.udrData             = udrData ?? throw new ArgumentNullException("udrData");
     this.httpClientFactory   = httpClientFactory ?? throw new ArgumentNullException("httpClientFactory");
     this.oauthClient         = oauthClient ?? throw new ArgumentNullException("oauthClient");
     this.decryptVariable     = decryptVariable ?? throw new ArgumentNullException("decryptVariable");
     this.slack               = slack ?? throw new ArgumentNullException("slack");
     this.headToHeadAPIClient = headToHeadAPIClient ?? throw new ArgumentNullException("headToHeadAPIClient");
 }
Ejemplo n.º 4
0
 public static Task <ChatUpdateResponse> ChatUpdate(this ISlackAPI client, Message originalMessage, string newText)
 {
     return(client.ChatUpdate(originalMessage.ts, originalMessage.channel, newText));
 }