matthidinger / ContosoScubaBot

Sample bot built with rich Adaptive Cards
https://contososcubademo.azurewebsites.net
MIT License
40 stars 36 forks source link

Dynamically binding data to a card #13

Open thecouchcoder opened 6 years ago

thecouchcoder commented 6 years ago

How would you go about dynamically binding data to an adaptive card?

For example, in Schools.JSON you can assume this query would actually go look up schools on Google then dynamically build the card. Is there a way to do this without hacking together the card through code? Any data binding options?

EricDahlvang commented 6 years ago

The https://www.nuget.org/packages/Razorback/ library provides this type of binding using Razor syntax. ProxyMessageView.cshtml and WildlifeView.cshtml in this project are using Razorback: https://github.com/matthidinger/ContosoScubaBot/tree/master/CardViews

thecouchcoder commented 6 years ago

Do you know of something similar to Razorback for node projects?

matthidinger commented 6 years ago

Sure do! 🙂

https://github.com/justinwilaby/babel-plugin-jsx-adaptive-cards

thecouchcoder commented 6 years ago

Thank you! I really appreciate the guidance!