Skip to content

A simple Azure function returning an Adaptive Card as HTML using the JavaScript SDK.

License

Notifications You must be signed in to change notification settings

cdngmnks/adaptive-cards-azure-functions-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Adaptive Cards - Azure Functions (JavaScript)

adaptiveCardRenderer

Function returning an Adaptive Card rendered as HTML, using the Adaptive Card JavaScript SDK.

example request:

{
    "type": "AdaptiveCard",
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.0",
    "hideOriginalBody": true,
    "body": [
        {
            "type": "TextBlock",
            "text": "Hello World!",
            "wrap": true
        }
    ]
}

example response:

<div class="ac-container ac-adaptiveCard" style="display: flex; flex-direction: column; justify-content: flex-start; box-sizing: border-box; flex: 0 0 auto; padding: 20px 20px 20px 20px; margin: 0px 0px 0px 0px; background-color: rgb(255, 255, 255); border: 1px solid #ffffff;" tabindex="0">
  <div class="ac-textBlock" style="overflow: hidden; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: rgb(51, 51, 51); font-weight: 400; text-align: left; line-height: 18.62px; word-wrap: break-word; box-sizing: border-box; flex: 0 0 auto;">
  </div>
</div>

adaptiveCardTemplating

Function expanding a template with data, using the Adaptive Card Templating SDK.

example request:

{
    "template" : {
        "type": "AdaptiveCard",
        "version": "1.0",
        "body": [
            {
                "type": "TextBlock",
                "text": "Hello ${name}!"
            }
        ]
    },
    "data" : {
        "name" : "World"
    }
}

example response:

{
  "type": "AdaptiveCard",
  "version": "1.0",
  "body": [
    {
      "type": "TextBlock",
      "text": "Hello World!"
    }
  ]
}

References

Issues

To view or log issues, see issues.

License

Copyright (c) codingmonkeys doo. All Rights Reserved. Licensed under the MIT license.

About

A simple Azure function returning an Adaptive Card as HTML using the JavaScript SDK.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks