API Clientinin¶
Note
İstifadəsi göstərilən bütün sorğular sinxrondur. Asinxron versiyasaları istifadə etmək üçün
bu importu edin və eyni-adlı funksiyaları await ilə çağırın:
from integrify.postaguvercini import PostaGuverciniAsyncClient
integrify.postaguvercini.client.PostaGuverciniClient
module-attribute
¶
PostaGuverciniClient = PostaGuverciniClientClass(sync=True)
integrify.postaguvercini.client.PostaGuverciniAsyncClient
module-attribute
¶
PostaGuverciniAsyncClient = PostaGuverciniClientClass(
sync=False
)
Note
Bunlar artıq hazır yaradılmış klass obyektləridir, birbaşa istifadə üçün nəzərdə tutulub. Əks halda
bütün sorğuları PostaGuverciniClientClass().send_single_sms() kimi istifadə etməlisiniz.
integrify.postaguvercini.client.PostaGuverciniClientClass
¶
PostaGuverciniClientClass(
name='PostaGuvercini',
base_url=BASE_URL,
default_handler=None,
sync=True,
dry=False,
)
Bases: APIClient, Generic[_Mode]
Posta Guvercini sorğular üçün baza class
send_single_sms
¶
send_single_sms(
message: str,
receivers: list[str],
send_date: Unset[str | datetime] = UNSET,
expire_date: Unset[str | datetime] = UNSET,
channel: ChannelType = OTP,
originator: Unset[str] = UNSET,
username: str = POSTA_GUVERCINI_USERNAME,
password: str = POSTA_GUVERCINI_PASSWORD,
) -> APIResponse[SendSMSResponseSchema]
send_single_sms(
message: str,
receivers: list[str],
send_date: Unset[str | datetime] = UNSET,
expire_date: Unset[str | datetime] = UNSET,
channel: ChannelType = OTP,
originator: Unset[str] = UNSET,
username: str = POSTA_GUVERCINI_USERNAME,
password: str = POSTA_GUVERCINI_PASSWORD,
) -> Coroutine[
Any, Any, APIResponse[SendSMSResponseSchema]
]
send_single_sms(*args, **kwds)
send_multiple_sms
¶
send_multiple_sms(
messages: list[SMSMessage],
send_date: Unset[str | datetime] = UNSET,
expire_date: Unset[str | datetime] = UNSET,
channel: ChannelType = OTP,
originator: Unset[str] = UNSET,
username: str = POSTA_GUVERCINI_USERNAME,
password: str = POSTA_GUVERCINI_PASSWORD,
) -> APIResponse[SendSMSResponseSchema]
send_multiple_sms(
messages: list[SMSMessage],
send_date: Unset[str | datetime] = UNSET,
expire_date: Unset[str | datetime] = UNSET,
channel: ChannelType = OTP,
originator: Unset[str] = UNSET,
username: str = POSTA_GUVERCINI_USERNAME,
password: str = POSTA_GUVERCINI_PASSWORD,
) -> Coroutine[
Any, Any, APIResponse[SendSMSResponseSchema]
]
send_multiple_sms(*args, **kwds)
get_status
¶
get_status(
message_ids: list[str],
username: str = POSTA_GUVERCINI_USERNAME,
password: str = POSTA_GUVERCINI_PASSWORD,
) -> APIResponse[StatusResponseSchema]
get_status(
message_ids: list[str],
username: str = POSTA_GUVERCINI_USERNAME,
password: str = POSTA_GUVERCINI_PASSWORD,
) -> Coroutine[Any, Any, APIResponse[StatusResponseSchema]]
get_status(*args, **kwds)
credit_balance
¶
credit_balance(
username: str = POSTA_GUVERCINI_USERNAME,
password: str = POSTA_GUVERCINI_PASSWORD,
) -> APIResponse[CreditBalanceResponseSchema]
credit_balance(
username: str = POSTA_GUVERCINI_USERNAME,
password: str = POSTA_GUVERCINI_PASSWORD,
) -> Coroutine[
Any, Any, APIResponse[CreditBalanceResponseSchema]
]
credit_balance(*args, **kwds)