Skip to content

Instantly share code, notes, and snippets.

@anoochit
Last active August 16, 2020 10:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anoochit/daea4a18771aa881ac545c2338fbe086 to your computer and use it in GitHub Desktop.
Save anoochit/daea4a18771aa881ac545c2338fbe086 to your computer and use it in GitHub Desktop.
payload_fanpop_response_to_line_server
//--- intent fanpop ---//
[{"type":"text","text":"พบข้อมูล 198 รายการ"},{"type":"template","altText":"this is a confirm template","template":{"type":"confirm","actions":[{"type":"postback","label":"ใช่","data":"action=show_fanpop_page&page=1&total=198"},{"type":"message","label":"ไม่ใช่","text":"เปลี่ยนการค้นหาใหม่"}],"text":"ต้องการแสดงข้อมูล"}}]
//--- result fanpop ---//
[
{"type":"flex","altText":"Flex Message","contents":{"type":"carousel","contents":[{"type":"bubble","direction":"ltr","hero":{"type":"image","url":"https://finfin.vip/sites/default/files/styles/large/public/photo/yiiiwahh/5D57898C-13E0-4F98-ACFF-49D250A39C5D.jpeg","size":"full","aspectRatio":"1:1","aspectMode":"cover"},"body":{"type":"box","layout":"vertical","contents":[{"type":"text","text":"yiiiwahh","size":"xxl","align":"center"},{"type":"text","text":"หญิง, 22 ปี","size":"lg","align":"center"},{"type":"text","text":"1400 บาท","size":"xl","align":"center"}]},"footer":{"type":"box","layout":"vertical","contents":[{"type":"button","action":{"type":"postback","label":"รายละเอียด","data":"action=show_item&nid=45427"},"style":"primary"}]}},{"type":"bubble","direction":"ltr","hero":{"type":"image","url":"https://finfin.vip/sites/default/files/styles/large/public/photo/socute3682/17CB4D92-CBAC-4C47-A177-29862D688068.jpeg","size":"full","aspectRatio":"1:1","aspectMode":"cover"},"body":{"type":"box","layout":"vertical","contents":[{"type":"text","text":"socute3682","size":"xxl","align":"center"},{"type":"text","text":"หญิง, 27 ปี","size":"lg","align":"center"},{"type":"text","text":"1500 บาท","size":"xl","align":"center"}]},"footer":{"type":"box","layout":"vertical","contents":[{"type":"button","action":{"type":"postback","label":"รายละเอียด","data":"action=show_item&nid=31260"},"style":"primary"}]}},{"type":"bubble","direction":"ltr","hero":{"type":"image","url":"https://finfin.vip/sites/default/files/styles/large/public/photo/nomyenfin/F53FD0C8-1148-4DE1-89BD-667916124592.jpeg","size":"full","aspectRatio":"1:1","aspectMode":"cover"},"body":{"type":"box","layout":"vertical","contents":[{"type":"text","text":"nomyenfin","size":"xxl","align":"center"},{"type":"text","text":"หญิง, 28 ปี","size":"lg","align":"center"},{"type":"text","text":"1100 บาท","size":"xl","align":"center"}]},"footer":{"type":"box","layout":"vertical","contents":[{"type":"button","action":{"type":"postback","label":"รายละเอียด","data":"action=show_item&nid=40986"},"style":"primary"}]}},{"type":"bubble","direction":"ltr","hero":{"type":"image","url":"https://finfin.vip/sites/default/files/styles/large/public/photo/alinallaround/06118866-DF3E-4A2F-A574-0B03B948F5FA.jpeg","size":"full","aspectRatio":"1:1","aspectMode":"cover"},"body":{"type":"box","layout":"vertical","contents":[{"type":"text","text":"alinallaround","size":"xxl","align":"center"},{"type":"text","text":"สาวสอง (ยังไม่แปลง), 22 ปี","size":"lg","align":"center"},{"type":"text","text":"1000 บาท","size":"xl","align":"center"}]},"footer":{"type":"box","layout":"vertical","contents":[{"type":"button","action":{"type":"postback","label":"รายละเอียด","data":"action=show_item&nid=20825"},"style":"primary"}]}},{"type":"bubble","direction":"ltr","hero":{"type":"image","url":"https://finfin.vip/sites/default/files/styles/large/public/photo/qqfin/92C941B7-0C9E-41C5-B789-AD28CFB7E38A.jpeg","size":"full","aspectRatio":"1:1","aspectMode":"cover"},"body":{"type":"box","layout":"vertical","contents":[{"type":"text","text":"qqfin","size":"xxl","align":"center"},{"type":"text","text":"หญิง, 28 ปี","size":"lg","align":"center"},{"type":"text","text":"1300 บาท","size":"xl","align":"center"}]},"footer":{"type":"box","layout":"vertical","contents":[{"type":"button","action":{"type":"postback","label":"รายละเอียด","data":"action=show_item&nid=44823"},"style":"primary"}]}},{"type":"bubble","direction":"ltr","hero":{"type":"image","url":"https://finfin.vip/sites/default/files/styles/large/public/photo/elniza00225/CA4012D5-1B78-4F18-82D9-A471EBCA6CA8.jpeg","size":"full","aspectRatio":"1:1","aspectMode":"cover"},"body":{"type":"box","layout":"vertical","contents":[{"type":"text","text":"elniza00225","size":"xxl","align":"center"},{"type":"text","text":"หญิง, 24 ปี","size":"lg","align":"center"},{"type":"text","text":" ","size":"xl","align":"center"}]},"footer":{"type":"box","layout":"vertical","contents":[{"type":"button","action":{"type":"postback","label":"รายละเอียด","data":"action=show_item&nid=51560"},"style":"primary"}]}},{"type":"bubble","direction":"ltr","hero":{"type":"image","url":"https://finfin.vip/sites/default/files/styles/large/public/photo/aeri/IMG_20200717_114629.jpg","size":"full","aspectRatio":"1:1","aspectMode":"cover"},"body":{"type":"box","layout":"vertical","contents":[{"type":"text","text":"aeri","size":"xxl","align":"center"},{"type":"text","text":"หญิง, 25 ปี","size":"lg","align":"center"},{"type":"text","text":"1300 บาท","size":"xl","align":"center"}]},"footer":{"type":"box","layout":"vertical","contents":[{"type":"button","action":{"type":"postback","label":"รายละเอียด","data":"action=show_item&nid=54441"},"style":"primary"}]}},{"type":"bubble","direction":"ltr","hero":{"type":"image","url":"https://finfin.vip/sites/default/files/styles/large/public/photo/nipontree/1DB4C2E4-3FBC-4F51-9B2F-40A6315017B7.png","size":"full","aspectRatio":"1:1","aspectMode":"cover"},"body":{"type":"box","layout":"vertical","contents":[{"type":"text","text":"nipontree","size":"xxl","align":"center"},{"type":"text","text":"หญิง, 27 ปี","size":"lg","align":"center"},{"type":"text","text":"1300 บาท","size":"xl","align":"center"}]},"footer":{"type":"box","layout":"vertical","contents":[{"type":"button","action":{"type":"postback","label":"รายละเอียด","data":"action=show_item&nid=8405"},"style":"primary"}]}},{"type":"bubble","direction":"ltr","hero":{"type":"image","url":"https://finfin.vip/sites/default/files/styles/large/public/photo/inging555/PicsArt_07-09-01.13.57.jpg","size":"full","aspectRatio":"1:1","aspectMode":"cover"},"body":{"type":"box","layout":"vertical","contents":[{"type":"text","text":"inging555","size":"xxl","align":"center"},{"type":"text","text":"หญิง, 27 ปี","size":"lg","align":"center"},{"type":"text","text":"1100 บาท","size":"xl","align":"center"}]},"footer":{"type":"box","layout":"vertical","contents":[{"type":"button","action":{"type":"postback","label":"รายละเอียด","data":"action=show_item&nid=53788"},"style":"primary"}]}},{"type":"bubble","direction":"ltr","hero":{"type":"image","url":"https://finfin.vip/sites/default/files/styles/large/public/photo/runglisa/20200518_165347.jpg","size":"full","aspectRatio":"1:1","aspectMode":"cover"},"body":{"type":"box","layout":"vertical","contents":[{"type":"text","text":"runglisa","size":"xxl","align":"center"},{"type":"text","text":"หญิง, 36 ปี","size":"lg","align":"center"},{"type":"text","text":"1500 บาท","size":"xl","align":"center"}]},"footer":{"type":"box","layout":"vertical","contents":[{"type":"button","action":{"type":"postback","label":"รายละเอียด","data":"action=show_item&nid=8680"},"style":"primary"}]}}]}},
{"type":"template","altText":"แสดงข้อมูลหน้าถัดไปหรือไม่","template":{"type":"confirm","actions":[{"type":"postback","label":"ใช่","data":"action=show_fanpop_page&page=2&total=198"},{"type":"message","label":"ไม่ใช่","text":"เปลี่ยนการค้นหาใหม่"}],"text":"แสดงข้อมูลหน้าถัดไป"}}
]
//--- ex01 show item with limit 3 photos ---//
[{"type":"text","text":"ชื่อ: minicooper24\nเพศ: หญิง\nอายุ: 24 ปี\nสัดส่วน: 36 / 24 / 33\nน้ำหนัก,ส่วนสูง: 40 / 152\nราคา: 1800 บาท\n\nLine: Minicooper.26\n\nPhone: ฟิวแฟน\n\nพื้นที่รับงาน: ถนนลาดพร้าว,ห้างเซ็นทรัลอีสต์วิลล์,ถนนประดิษฐ์มนูธรรม (เลียบด่วนรามอินทรา),ถนนนาคนิวาส,ถนนนวมินทร์\n"},{"type":"flex","altText":"รูปภาพ","contents":{"type":"carousel","contents":[{"type":"bubble","direction":"ltr","hero":{"type":"image","url":"https://finfin.vip/sites/default/files/styles/large/public/photo/minicooper24/A5C6F6E8-C0E2-495B-9A7B-8B6621B773AB.jpeg","size":"full","aspectMode":"fit"}},{"type":"bubble","direction":"ltr","hero":{"type":"image","url":"https://finfin.vip/sites/default/files/styles/large/public/photo/minicooper24/699394CA-65C8-4947-860F-8DFD81D3C5AC.jpeg","size":"full","aspectMode":"fit"}},{"type":"bubble","direction":"ltr","hero":{"type":"image","url":"https://finfin.vip/sites/default/files/styles/large/public/photo/minicooper24/38525D35-5AF9-45F2-A764-3BA93718E7C1.jpeg","size":"full","aspectMode":"fit"}}]}},{"type":"flex","altText":"ข้อมูล minicooper24","contents":{"type":"bubble","direction":"ltr","body":{"type":"box","layout":"vertical","contents":[{"type":"text","text":"ติดต่อ minicooper24","size":"lg","align":"start"}]},"footer":{"type":"box","layout":"horizontal","contents":[{"type":"button","action":{"type":"uri","label":"LINE Minicooper.26","uri":"http://line.me/ti/p/~Minicooper.26"},"style":"primary"}]}}}]
//--- ex02 show item with limit 3 photos ---//
[{"type":"text","text":"ชื่อ: zel477\nเพศ: หญิง\nอายุ: 25 ปี\nสัดส่วน: 33 / 26 / 34\nน้ำหนัก,ส่วนสูง: 53 / 166\nราคา: 1500 บาท\n\nLine: rapunzel477\n\nพื้นที่รับงาน: ถนนรัตนาธิเบศร์,จังหวัดนนทบุรี,ห้างบิ๊กซีรัตนาธิเบศร์,ถนนแจ้งวัฒนะ,อำเภอบางใหญ่\n"},{"type":"flex","altText":"รูปภาพ","contents":{"type":"carousel","contents":[{"type":"bubble","direction":"ltr","hero":{"type":"image","url":"https://finfin.vip/sites/default/files/styles/large/public/photo/zel477/S__116097075.jpg","size":"full","aspectMode":"fit"}},{"type":"bubble","direction":"ltr","hero":{"type":"image","url":"https://finfin.vip/sites/default/files/styles/large/public/photo/zel477/S__116097077.jpg","size":"full","aspectMode":"fit"}},{"type":"bubble","direction":"ltr","hero":{"type":"image","url":"https://finfin.vip/sites/default/files/styles/large/public/photo/zel477/S__116097078.jpg","size":"full","aspectMode":"fit"}}]}},{"type":"flex","altText":"ข้อมูล zel477","contents":{"type":"bubble","direction":"ltr","body":{"type":"box","layout":"vertical","contents":[{"type":"text","text":"ติดต่อ zel477","size":"lg","align":"start"}]},"footer":{"type":"box","layout":"horizontal","contents":[{"type":"button","action":{"type":"uri","label":"LINE rapunzel477","uri":"http://line.me/ti/p/~rapunzel477"},"style":"primary"}]}}}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment