You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This client abstracts away the complexities of the underlying HTTP API while providing all the necessary functionality to send and track SMS messages through Android devices.
27
27
28
28
## 📚 Table of Contents
29
-
-[📱 SMS Gateway for Android™ Python API Client](#-sms-gateway-for-android-python-api-client)
29
+
-[📱 SMSGate Python API Client](#-smsgate-python-api-client)
30
30
-[📖 About The Project](#-about-the-project)
31
31
-[📚 Table of Contents](#-table-of-contents)
32
32
-[✨ Features](#-features)
@@ -42,12 +42,24 @@ This client abstracts away the complexities of the underlying HTTP API while pro
42
42
-[🤖 Client Guide](#-client-guide)
43
43
-[Client Configuration](#client-configuration)
44
44
-[Available Methods](#available-methods)
45
+
-[Message Methods](#message-methods)
46
+
-[Webhook Methods](#webhook-methods)
47
+
-[Device Methods](#device-methods)
48
+
-[Settings Methods](#settings-methods)
49
+
-[Log Methods](#log-methods)
50
+
-[Health Check Methods](#health-check-methods)
51
+
-[Token Methods](#token-methods)
45
52
-[Data Structures](#data-structures)
46
53
-[Message](#message)
47
54
-[MessageState](#messagestate)
48
55
-[Webhook](#webhook)
56
+
-[Device](#device)
57
+
-[DeviceSettings](#devicesettings)
49
58
-[TokenRequest](#tokenrequest)
50
59
-[TokenResponse](#tokenresponse)
60
+
-[HealthResponse](#healthresponse)
61
+
-[LogEntry](#logentry)
62
+
-[Enums](#enums)
51
63
-[🌐 HTTP Clients](#-http-clients)
52
64
-[Using Specific Clients](#using-specific-clients)
53
65
-[Custom HTTP Client](#custom-http-client)
@@ -75,7 +87,13 @@ This client abstracts away the complexities of the underlying HTTP API while pro
75
87
- 💻 **Full Type Hinting**: Fully typed for better development experience
76
88
- ⚠️ **Robust Error Handling**: Specific exceptions and clear error messages
77
89
- 📈 **Delivery Reports**: Track your message delivery status
78
-
- 🔑 **Token Management**: Generate and revoke JWT tokens with custom scopes and TTL
90
+
- 🔑 **Token Management**: Generate, refresh, and revoke JWT tokens with custom scopes and TTL
91
+
- 📊 **Message Filtering**: List messages with date range, state, and device filtering
92
+
- ⚙️ **Settings Management**: Get, update, and patch device settings
93
+
- 📝 **Logging**: Retrieve system logs with time range filtering
94
+
- 🏥 **Health Checks**: Liveness, readiness, and startup probes
95
+
- 📱 **Device Management**: List and remove registered devices
96
+
- 📥 **Inbox Export**: Export received messages via webhooks
79
97
80
98
## ⚙️ Requirements
81
99
@@ -150,22 +168,22 @@ message = domain.Message(
150
168
defsync_example():
151
169
with client.APIClient(login, password) as c:
152
170
# Send message
153
-
state= c.send(message)
154
-
print(f"Message sent with ID: {state.id}")
171
+
response= c.send(message)
172
+
print(f"Message sent with ID: {response.id}")
155
173
156
174
# Check status
157
-
status = c.get_state(state.id)
175
+
status = c.get_state(response.id)
158
176
print(f"Status: {status.state}")
159
177
160
178
# Asynchronous Client
161
179
asyncdefasync_example():
162
180
asyncwith client.AsyncAPIClient(login, password) as c:
163
181
# Send message
164
-
state=await c.send(message)
165
-
print(f"Message sent with ID: {state.id}")
182
+
response=await c.send(message)
183
+
print(f"Message sent with ID: {response.id}")
166
184
167
185
# Check status
168
-
status =await c.get_state(state.id)
186
+
status =await c.get_state(response.id)
169
187
print(f"Status: {status.state}")
170
188
171
189
if__name__=="__main__":
@@ -194,8 +212,8 @@ message = domain.Message(
194
212
195
213
# Client with encryption
196
214
with client.APIClient(login, password, encryptor=encryptor) as c:
197
-
state= c.send(message)
198
-
print(f"Encrypted message sent: {state.id}")
215
+
response= c.send(message)
216
+
print(f"Encrypted message sent: {response.id}")
199
217
```
200
218
201
219
### JWT Authentication Example
@@ -238,8 +256,8 @@ with client.APIClient(login, password) as c:
238
256
text="Hello from newly generated JWT token!",
239
257
),
240
258
)
241
-
state= jwt_client.send(message)
242
-
print(f"Message sent with new JWT token: {state.id}")
259
+
response= jwt_client.send(message)
260
+
print(f"Message sent with new JWT token: {response.id}")
243
261
244
262
# Revoke the token when no longer needed
245
263
jwt_client.revoke_token(token_response.id)
@@ -285,42 +303,91 @@ Both clients (`APIClient` and `AsyncAPIClient`) support these parameters:
0 commit comments