Skip to content

Commit caa4615

Browse files
authored
Merge pull request #149 from line/add_sample_code_for_flex_update
Add sample code for flex update1
2 parents b23be87 + 911d77a commit caa4615

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

examples/kitchensink/app.rb

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,45 @@ def handle_message(event)
481481
},
482482
})
483483

484+
when 'flex1'
485+
reply_content(event, {
486+
"type": "bubble",
487+
"size": "nano",
488+
"hero": {
489+
"type": "image",
490+
"url": THUMBNAIL_URL,
491+
"size": "full",
492+
"aspectRatio": "4:3",
493+
"action": {
494+
"type": "uri",
495+
"uri": "http://linecorp.com/"
496+
}
497+
},
498+
"body": {
499+
"type": "box",
500+
"layout": "vertical",
501+
"contents": [
502+
{
503+
"type": "text",
504+
"text": "hello",
505+
"contents": [
506+
{
507+
"type": "span",
508+
"text": "hello",
509+
"color": "#FF0000"
510+
},
511+
{
512+
"type": "span",
513+
"text": "world",
514+
"color": "#0000FF"
515+
}
516+
]
517+
}
518+
],
519+
"paddingAll": "10px"
520+
},
521+
})
522+
484523
when 'bye'
485524
case event['source']['type']
486525
when 'user'

0 commit comments

Comments
 (0)