WebexPythonSDK icon indicating copy to clipboard operation
WebexPythonSDK copied to clipboard

move the choices to simple_properties,can be gotten as a dict

Open w5678 opened this issue 5 years ago • 1 comments

We can run this code rightly with fixing this bugs of choices.

    choices_list= [
                {
                    "title": "Red",
                    "value": "Red"
                },
                {
                    "title": "Blue",
                    "value": "Blue"
                },
                {
                    "title": "Green",
                    "value": "Green"
                }
            ]
    data_type = Choices(choices=choices_list,id="choices",style="select")
    #dt=data_type.to_dict()
    #print(dt)
    utime =Date('updatetime')
    submit = Submit(title="Send Send!")
    card = AdaptiveCard(body=[greeting, first_name,data_type,age,utime], actions=[submit])

w5678 avatar Dec 28 '20 03:12 w5678

Thanks for providing this. The Choice is a distinct entity in the adaptive card specifications and so far this wrapper has adhered to that specification. What do you think about a type check and allowing both ways?

sQu4rks avatar Apr 08 '21 11:04 sQu4rks