Skip to content

Instantly share code, notes, and snippets.

@beachside-project
Created October 2, 2019 09:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beachside-project/9551290e8c9c5c3d5344ec874c75f8ae to your computer and use it in GitHub Desktop.
Save beachside-project/9551290e8c9c5c3d5344ec874c75f8ae to your computer and use it in GitHub Desktop.
CustomBindingsSamples.TeamsBinding
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