-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexamples_2.py
42 lines (37 loc) · 1.07 KB
/
examples_2.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
"""Example of how to use the library by using the classes directly."""
from puzzel_sms_gateway_client import (
Client,
GasSettings,
Message,
MessageSettings,
OriginatorSettings,
Parameter,
SendWindow,
)
BASE_ADDRESS = "NEEDS TO BE SET BY THE USER"
SERVICE_ID = 0000 # NEEDS TO BE SET BY THE USER
USERNAME = "NEEDS TO BE SET BY THE USER"
PASSWORD = "NEEDS TO BE SET BY THE USER"
RECIPIENT = "+4710101010"
client = Client(
service_id=SERVICE_ID,
username=USERNAME,
password=PASSWORD,
base_address=BASE_ADDRESS,
)
client.send(
messages=[
Message(
recipient=RECIPIENT,
content="Hello World!",
settings=MessageSettings( # Optional
send_window=SendWindow(
start_date="2023-04-26",
stop_date="2022-04-26", # Optional # If not included SMS is sent immediately
start_time="22:15:00",
stop_time="22:16:00", # Optional # If not included SMS is sent immediately
),
),
),
]
)