| Copyright | (c) 2015 GetShopTV |
|---|---|
| License | BSD3 |
| Maintainer | nickolay@getshoptv.com |
| Stability | experimental |
| Safe Haskell | None |
| Language | Haskell2010 |
SMSAero.Client
Contents
Description
SMSAero HTTP servant client and individual client functions.
- smsAeroClient :: Client SMSAeroAPI
- defaultBaseUrl :: BaseUrl
- type SmsAero a = ClientM (SmsAeroResponse a)
- smsAeroSend :: SMSAeroAuth -> Phone -> MessageBody -> Signature -> Maybe SMSAeroDate -> Maybe SendType -> Maybe DigitalChannel -> SmsAero SendResponse
- smsAeroSendToGroup :: SMSAeroAuth -> Group -> MessageBody -> Signature -> Maybe SMSAeroDate -> Maybe SendType -> Maybe DigitalChannel -> SmsAero SendResponse
- smsAeroStatus :: SMSAeroAuth -> MessageId -> SmsAero MessageStatus
- smsAeroCheckSending :: SMSAeroAuth -> MessageId -> SmsAero CheckSendingResponse
- smsAeroBalance :: SMSAeroAuth -> SmsAero BalanceResponse
- smsAeroCheckTariff :: SMSAeroAuth -> SmsAero CheckTariffResponse
- smsAeroSenders :: SMSAeroAuth -> SmsAero SendersResponse
- smsAeroSign :: SMSAeroAuth -> SmsAero SignResponse
- smsAeroListGroups :: SMSAeroAuth -> SmsAero [Group]
- smsAeroAddGroup :: SMSAeroAuth -> Group -> SmsAero GroupResponse
- smsAeroDeleteGroup :: SMSAeroAuth -> Group -> SmsAero GroupResponse
- smsAeroAddPhone :: SMSAeroAuth -> Phone -> Maybe Group -> Maybe Name -> Maybe Name -> Maybe Name -> Maybe BirthDate -> Maybe Text -> SmsAero PhoneResponse
- smsAeroDeletePhone :: SMSAeroAuth -> Phone -> Maybe Group -> SmsAero PhoneResponse
- smsAeroAddToBlacklist :: SMSAeroAuth -> Phone -> SmsAero BlacklistResponse
Client
smsAeroClient :: Client SMSAeroAPI Source #
SMSAero client.
defaultBaseUrl :: BaseUrl Source #
Default host https://gate.smsaero.ru.
type SmsAero a = ClientM (SmsAeroResponse a) Source #
Common SMSAero client response type.
Sending a message
Arguments
| :: SMSAeroAuth | Authentication data (login and MD5 hash of password). |
| -> Phone | Phone number to send a message to. |
| -> MessageBody | Message text. |
| -> Signature | Sender's signature used for the "from" field. |
| -> Maybe SMSAeroDate | Date stating when to send a postponed message. |
| -> Maybe SendType | Send channel description. |
| -> Maybe DigitalChannel | Use digital send channel. |
| -> SmsAero SendResponse |
Send a message.
Arguments
| :: SMSAeroAuth | Authentication data (login and MD5 hash of password). |
| -> Group | Group name for broadcasting a message. |
| -> MessageBody | Message text. |
| -> Signature | Sender's signature used for the "from" field. |
| -> Maybe SMSAeroDate | Date stating when to send a postponed message. |
| -> Maybe SendType | Send channel description. |
| -> Maybe DigitalChannel | Use digital send channel. |
| -> SmsAero SendResponse |
Send a group message.
Checking status
Arguments
| :: SMSAeroAuth | Authentication data (login and MD5 hash of password). |
| -> MessageId | Message ID. |
| -> SmsAero MessageStatus |
Check status of a previously sent message.
Arguments
| :: SMSAeroAuth | Authentication data (login and MD5 hash of password). |
| -> MessageId | Broadcast ID. |
| -> SmsAero CheckSendingResponse |
Check status of a broadcast.
Checking balance and tariff
Arguments
| :: SMSAeroAuth | Authentication data (login and MD5 hash of password). |
| -> SmsAero BalanceResponse |
Check balance.
Arguments
| :: SMSAeroAuth | Authentication data (login and MD5 hash of password). |
| -> SmsAero CheckTariffResponse |
Check tariff.
Signatures
Arguments
| :: SMSAeroAuth | Authentication data (login and MD5 hash of password). |
| -> SmsAero SendersResponse |
Check the list of available sender signatures.
Arguments
| :: SMSAeroAuth | Authentication data (login and MD5 hash of password). |
| -> SmsAero SignResponse |
Acquire a new signature.
Groups
Arguments
| :: SMSAeroAuth | Authentication data (login and MD5 hash of password). |
| -> SmsAero [Group] |
Get groups list (corresponds to checkgroup endpoint).
Arguments
| :: SMSAeroAuth | Authentication data (login and MD5 hash of password). |
| -> Group | Name for the new group. |
| -> SmsAero GroupResponse |
Add a group.
Arguments
| :: SMSAeroAuth | Authentication data (login and MD5 hash of password). |
| -> Group | Name of the group to be deleted. |
| -> SmsAero GroupResponse |
Delete a group.
Contacts
Arguments
| :: SMSAeroAuth | Authentication data (login and MD5 hash of password). |
| -> Phone | Subscriber's phone number. |
| -> Maybe Group | Contact group. If absent, contact will be added to general contact list. |
| -> Maybe Name | Subscriber's last name. |
| -> Maybe Name | Subscriber's first name. |
| -> Maybe Name | Subscriber's middle name. |
| -> Maybe BirthDate | Subscriber's birth date. |
| -> Maybe Text | Any additional information. |
| -> SmsAero PhoneResponse |
Add a phone to contact list or group.
Arguments
| :: SMSAeroAuth | Authentication data (login and MD5 hash of password). |
| -> Phone | Subscriber's phone number. |
| -> Maybe Group | Group to remove contact from. If absent, contact will be deleted from general contact list. |
| -> SmsAero PhoneResponse |
Delete a phone from contact list or group.
Blacklist
smsAeroAddToBlacklist Source #
Arguments
| :: SMSAeroAuth | Authentication data (login and MD5 hash of password) |
| -> Phone | Phone number to be added to blacklist. |
| -> SmsAero BlacklistResponse |
Add a phone number to blacklist.