Skip to content

Commit d623bac

Browse files
Merge pull request #9 from Palbahngmiyine/main
Update pyproject.toml and examples/sms.py
2 parents b3c5edb + 0ab8e4e commit d623bac

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

examples/sms/sms.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
from solapi import SolapiMessageService
2-
from solapi.model import Message
2+
from solapi.model import Message, SendRequestConfig
33

44
message_service = SolapiMessageService(
55
api_key="YOUR_API_KEY", api_secret="YOUR_API_SECRET"
66
)
77
message = Message(from_="등록한 발신번호", to="01000000000", text="Hello World!")
88
response = message_service.send(message)
99
print(response)
10+
11+
# 또는 list Type으로 여러건의 메시지를 발송할 수 있습니다! allow_duplicates를 True로 활성화하면 중복 수신번호를 허용합니다!
12+
messages = [
13+
Message(from_="등록한 발신번호", to="01000000000", text="Hello World! 1"),
14+
Message(from_="등록한 발신번호", to="01000000000", text="Hello World! 2"),
15+
Message(from_="등록한 발신번호", to="01000000000", text="Hello World! 3"),
16+
]
17+
response = message_service.send(messages, SendRequestConfig(allow_duplicates=True))
18+
print(response)

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,6 @@ dev = [
3838
[build-system]
3939
requires = ["hatchling"]
4040
build-backend = "hatchling.build"
41+
42+
[tool.hatch.build]
43+
packages = ["solapi"]

0 commit comments

Comments
 (0)