예제 #1
0
        public static async Task TribeStandup([TimerTrigger("0 40 9 * * 1,2,3,4,5")] TimerInfo myTimer, ILogger log)
        {
            var victim  = Victims.GetVictim();
            var message = new Message
            {
                text = $"<@{victim}>, it is your turn to go to Tribe Standup"
            };
            var response = await httpClient.PostAsJsonAsync <Message>(slackWebhookUri, message);

            var responseContent = await response.Content.ReadAsStringAsync();

            log.Log(LogLevel.Information, responseContent);
        }
예제 #2
0
        public static async Task <IActionResult> Retry(
            [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
            ILogger log)
        {
            var victim  = Victims.GetVictim();
            var message = new Message
            {
                text = $"Repetition is a form of change. <@{victim}>, you're up!"
            };
            var response = await httpClient.PostAsJsonAsync <Message>(slackWebhookUri, message);

            var responseContent = await response.Content.ReadAsStringAsync();

            log.Log(LogLevel.Information, responseContent);

            return(new OkResult());
        }