[DAY20]图片旋转木马

TemplateSendMessage - ImageCarouselTemplate

image_carousel_template_message = TemplateSendMessage(
    alt_text='ImageCarousel template',
    template=ImageCarouselTemplate(
        columns=[
            ImageCarouselColumn(
                image_url='https://example.com/item1.jpg',
                action=PostbackAction(
                    label='postback1',
                    display_text='postback text1',
                    data='action=buy&itemid=1'
                )
            ),
            ImageCarouselColumn(
                image_url='https://example.com/item2.jpg',
                action=PostbackAction(
                    label='postback2',
                    display_text='postback text2',
                    data='action=buy&itemid=2'
                )
            )
        ]
    )
)

Image carousel template
Template with multiple images which can be cycled like a carousel. The images are shown in order when scrolling horizontally.

type
String Required
image_carousel
跟旋转木马相同栏位最多10个
columns
Array of column objects Required
Array of columns
Max columns: 10
模板只能用矩形的
Column object for image carousel
imageUrl
String Required
Image URL (Max character limit: 2,000)
HTTPS over TLS 1.2 or later
JPEG or PNG
Aspect ratio: 1:1
Max width: 1024px
Max file size: 10 MB
当图片被按下後的动作及图片的表现
action
Action object Required
Action when image is tapped
https://ithelp.ithome.com.tw/upload/images/20211004/20140159K6zzaqcbWb.png


<<:  Day26 Uptime 功能介面

>>:  【Day 19】while 回圈 / for 回圈的范例讲解

欢迎下载 PDF分解器 PDFdissector【免费】

欢迎下载本人自制 PDF分解器 PDFdissector【免费】 PDFdissector.msi ...

Day 30 没credit也要把隐私规划做好

系统软件开发出身,後来转为SA、PM到产品服务架构师,後来专心研究隐私服务相关的规划,如同Day1开...

Day 0xF UVa10071 Back to High School Physics

Virtual Judge ZeroJudge 题意 输入粒子经过 t 秒後的速度为 v,求 2t...

30天学会C语言: Day 2-世界泥豪

今天要让电脑说泥豪 printf() stdio.h 中的函式,可以把 字串 显示到程序的视窗上 字...

Day13 测试写起乃 - controller test

Controller test 主要测在 controller 的 action,基本的 CRUD ...