(20241204) Updated Gmail client and Nimbus client.

This commit is contained in:
2024-12-04 13:03:51 +05:30
parent 293f753381
commit e51a6de5fc
4 changed files with 28 additions and 63 deletions
View File
@@ -79,6 +79,9 @@ class AsyncNimbusSMS:
MESSAGE_TYPE_REGULAR = 0
MESSAGE_TYPE_UNICODE = 1
MESSAGE_TYPE_NOT_FLASH = 0
MESSAGE_TYPE_FLASH = 1
def __init__(
self,
entity_id,
@@ -147,7 +150,8 @@ class AsyncNimbusSMS:
template_id,
recipient_number,
message,
message_type = MESSAGE_TYPE_REGULAR
message_type = MESSAGE_TYPE_REGULAR,
flash = MESSAGE_TYPE_NOT_FLASH
):
"""
@@ -160,6 +164,7 @@ class AsyncNimbusSMS:
:param message: The message to send to the recipient. Should match the template that is being sent.
:param message_type: Choose between 'AsyncNimbusSMS.MESSAGE_TYPE_REGULAR' (default) and
'AsyncNimbusSMS.MESSAGE_TYPE_UNICODE' based on the type of characters being sent. Both are class variables.
:param flash: to choose between a regular inbox SMS, or a flash SMS.
:return: The dict of all the details of the message that was sent including whether, or not, it was successfully
sent. Other details depend on the service provider (Nimbus IT in this case).
"""
@@ -173,7 +178,8 @@ class AsyncNimbusSMS:
"message": message,
"length": len(message),
"template_id": template_id,
"raw": None
"raw": None,
"isFlash": True if flash else False
}
try:
@@ -192,7 +198,8 @@ class AsyncNimbusSMS:
"text": message,
"entityid": self.__entity_id,
"templateid": template_id,
"type": message_type
"type": message_type,
"flash": flash
}
)