Created
October 2, 2019 09:40
-
-
Save beachside-project/9551290e8c9c5c3d5344ec874c75f8ae to your computer and use it in GitHub Desktop.
CustomBindingsSamples.TeamsBinding
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TeamsMessageHelper | |
{ | |
private static string BaseJson = "{{\"title\":\"{0}\",\"text\":\"{1}\",\"themeColor\":\"{2}\",\"@context\":\"https://schema.org/extensions\",\"@type\":\"MessageCard\",\"potentialAction\":[{{\"@type\":\"OpenUri\",\"name\":\"View More\",\"targets\":[{{\"os\":\"default\",\"uri\":\"{3}\"}}]}}]}}\n"; | |
public static string GetJson(string title, string text, string linkUri, string themeColor = "0072C6") | |
{ | |
// TODO: validation | |
return string.Format(BaseJson, title, text, themeColor, linkUri); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment