Upgrade to Pro — share decks privately, control downloads, hide ads and more …

20181003_flex

 20181003_flex

【福岡】Bot開発技術を極めたいエンジニア大集合! 福岡市粗大ごみ受付Botを大解剖 資料
https://line.connpass.com/event/100319/

knowledge_sakura

October 03, 2018
Tweet

More Decks by knowledge_sakura

Other Decks in Business

Transcript

  1. ᶃϝοηʔδͷશମ ᶄϝοηʔδͷຊจ ᶅຊจશମΛғΉϘοΫεΛ഑ஔ ᶆςΩετΛ഑ஔ { "type": "bubble", // ᶃ "body":

    { // ᶄ "type": "box", // ᶅ "layout": "horizontal", "contents": [ { "type": "text", // ᶆ "text": “Hello, World" } ] } } HELLO, WORLD
  2. curl -v -X POST 'https://api.line.me/v2/bot/message/push' \ -H “Content-Type:application/json" -H “Authorization:Bearer

    <channel access token>“ -d \ ‘{ “to": "U4af4980629…", "messages": [{ "type": "flex", "altText": "this is a flex message", "contents": { "type": "bubble", "body": { "type": "box", "layout": "horizontal", "contents": [ { "type": "text", "text": "Hello, World" } ] } } } ] }'
  3. BOX LAYOUT SYSTEM layout: “horizontal” spacing spacing spacing gravity align

    gravity align gravity align gravity align layout: “vertical” spacing spacing spacing gravity align gravity align gravity align gravity align layout: “baseline” spacing spacing spacing align align align align
  4. FLEX PROPERTY Closing The Distance flex=1 flex=2 flex=0 Closing The

    Distance Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt
  5. flex message support Java ✅ nodejs ✅ python ✅ go

    ✅ php ✅ ruby Not yet perl Not yet OFFICIAL SDK
  6. curl -v -X POST 'https://api.line.me/v2/bot/message/push' \ -H "Content-Type:application/json" -H "Authorization:Bearer

    <channel access token>" -d \ '{ "to": "U4af4980629…", "messages": [ { "type": "text", "text": "this is a flex message", "quickReply": { "items": [ { "type": "action", "action": { "type": "message", "label": "Sushi", "text": "Sushi" } }, { "type": "action", "action": { "type": "message", "label": "Tempura", "text": "Tempura" } }, { "type": "action", "action": { "type": "location", "label": "Send location" } } ] } } ] }'
  7. ·ͱΊ • Template Message • RichMenu • Flex Message (New!)

    • Quick Reply (New!) • LIFF (New!) LINE Bot APIͷUI֦ுػೳΛۦ࢖ͨ͠ಠ૑తͳ BotΛ͓଴͍ͪͯ͠·͢!