Skip to content

kakao i openbuilder skill response template builder βš’ for python 🐍

License

Notifications You must be signed in to change notification settings

taeminlee/kakao-skill-template-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

kakao-skill-template-builder

kakao i openbuilder skill response template builder βš’ for python 🐍

νŒŒμ΄μ¬μ—μ„œ 카카였 i μ˜€ν”ˆλΉŒλ”μ˜ 응닡 νƒ€μž…λ³„ JSON 포맷을 μƒμ„±ν•˜λŠ” 도ꡬ μž…λ‹ˆλ‹€.

νŠΉμ§•

πŸ‘Œ μ˜€ν”ˆλΉŒλ” λ„μ›€λ§μ˜ λͺ¨λ“  응닡 νƒ€μž…λ³„ JSON 포맷을 λ§Œλ“€ 수 μžˆμŠ΅λ‹ˆλ‹€. λͺ¨λ‘ λ‹€ ν…ŒμŠ€νŠΈ ν•΄λ΄€μ–΄μš”! 😊 tests/test_builder.pyλ₯Ό μ°Έκ³ !

βš’ SkillResponseBuilder λ₯Ό μ΄μš©ν•΄μ„œ μ›ν•˜λŠ”λŒ€λ‘œ 이것저것 μ„žμΈ λŒ€λ‹΅μ„ λ§Œλ“€ 수 μžˆμŠ΅λ‹ˆλ‹€!

🐍 파이썬의 local λ³€μˆ˜λ₯Ό μ΄μš©ν•΄μ„œ μ½”λ“œκ°€ μ—„μ²­ μ§§μ•„μš”! 고치기 μ‰½λ‹€λŠ” 뜻이죠.

Installation

$ pip install kakaosb

Example

  1. SimpleText
from kakaosb import SkillResponseBuilder, SimpleText

sb = SkillResponseBuilder([SimpleText('Hello Kakao!')])
res_dict = sb.to_dict()  # 사전 ν˜•μ‹ λ³€ν™˜
res_json = sb.to_json(indent=4)  # json ν˜•μ‹ λ³€ν™˜
  1. 베이직 μΉ΄λ“œ
from kakaosb import SkillResponseBuilder, BasicCard, Thumbnail, Profile, Social, MessageButton, WeblinkButton

sb = SkillResponseBuilder()
basicCard = BasicCard(
    thumbnail=Thumbnail('http://k.kakaocdn.net/dn/83BvP/bl20duRC1Q1/lj3JUcmrzC53YIjNDkqbWK/i_6piz1p.jpg'),
    title='λ³΄λ¬Όμƒμž',
    description='λ³΄λ¬Όμƒμž μ•ˆμ—λŠ” 뭐가 μžˆμ„κΉŒ',
    profile=Profile('λ³΄λ¬Όμƒμž', 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcT4BJ9LU4Ikr_EvZLmijfcjzQKMRCJ2bO3A8SVKNuQ78zu2KOqM'),
    social=Social(1238, 8, 780),
    buttons=[
        MessageButton('열어보기', 'μ§œμž”! μš°λ¦¬κ°€ 찾던 λ³΄λ¬Όμž…λ‹ˆλ‹€'),
        WeblinkButton('κ΅¬κ²½ν•˜κΈ°', 'https://e.kakao.com/t/hello-ryan')
    ])
sb.append(basicCard)
res_dict = sb.to_dict()  # 사전 ν˜•μ‹ λ³€ν™˜
res_json = sb.to_json(indent=4)  # json ν˜•μ‹ λ³€ν™˜
  1. mix
from kakaosb import SkillResponseBuilder, SimpleText, SimpleImage

sb = SkillResponseBuilder()
sb.append(SimpleText('Hello Kakao!'))
sb.append(SimpleImage('http://k.kakaocdn.net/dn/83BvP/bl20duRC1Q1/lj3JUcmrzC53YIjNDkqbWK/i_6piz1p.jpg', 'λ³΄λ¬Όμƒμžμž…λ‹ˆλ‹€'))
sb.append(SimpleText('Bye Bye 🧀'))
res_dict = sb.to_dict()  # 사전 ν˜•μ‹ λ³€ν™˜
res_json = sb.to_json(indent=4)  # json ν˜•μ‹ λ³€ν™˜

About

kakao i openbuilder skill response template builder βš’ for python 🐍

Topics

Resources

License

Stars

Watchers

Forks

Languages