示例#1
0
        public async Task NoticeAsync(Webhook webhook)
        {
            var tasks = _serverChanOptions.Value.ScKeys.Select(key =>
            {
                var desp    = @$ "
#### 消息  
{webhook.Message}
#### 时间  
`{webhook.CreatedAt:yyyy-MM-dd HH:mm:ss fff}`";
                var hostApi = string.Format(_serverChanOptions.Value.Api, key);
                var url     = $"{hostApi}?text={webhook.Title()}&desp={WebUtility.UrlEncode(desp)}";
                return(_baseRestfulApi.GetStringAsync(url));
            }).ToList();