public void TestMethod6() { IDingDingMessage msg = new SingleActionCardMessage { Title = "乔布斯 20 年前想打造一间苹果咖啡厅,而它正是 Apple Store 的前身", Text = "![screenshot](@lADOpwk3K80C0M0FoA) ### 乔布斯 20 年前想打造的苹果咖啡厅 Apple Store 的设计正从原来满满的科技感走向生活化,而其生活化的走向其实可以追溯到 20 年前苹果一个建立咖啡馆的计划", HideAvatar = 0, BtnOrientation = 0, SingleActionCardButtons = new List <SingleActionCardButton> { new SingleActionCardButton { Title = "内容不错", ActionURL = "https://www.dingtalk.com/" }, new SingleActionCardButton { Title = "不感兴趣", ActionURL = "https://www.dingtalk.com/" } } }; DingDingClient.SendMessageAsync(WebHookUrl, msg).Wait(); }
public void SingleActionCardMessageTest() { SingleActionCardMessage message = new SingleActionCardMessage { actionCard = new SingleActionCardMessageItem { title = "GitLab 乔布斯 20 年前想打造一间苹果咖啡厅,而它正是 Apple Store 的前身", text = @"![screenshot](@lADOpwk3K80C0M0FoA) ### 乔布斯 20 年前想打造的苹果咖啡厅 Apple Store 的设计正从原来满满的科技感走向生活化,而其生活化的走向其实可以追溯到 20 年前苹果一个建立咖啡馆的计划", btnOrientation = 0, hideAvatar = 0, btns = new List <SingleActionCardBtn> { new SingleActionCardBtn { title = "内容不错", actionURL = "www.baidu.com" }, new SingleActionCardBtn { title = "不感兴趣", actionURL = "www.google.com" } } } }; var result = DingtalkClient.SendMessageAsync(webHookUrl, message).Result; Assert.Equal(0, result.errcode); }