servant-smsc-ru-0.1.0.0: Servant client for smsc.ru service for sending SMS to cell phones

Copyright(c) Anton Gushcha, 2016
LicenseMIT
Maintainerncrashed@gmail.com
Stabilityexperimental
PortabilityPortable
Safe HaskellNone
LanguageHaskell2010

Servant.API.SMSC.RU.API

Contents

Description

 

Synopsis

API

type SMSCAPI = SendEndpoint Source

All supported API of smsc.ru service

Endpoints

data SendResponse Source

Response for SendEndpoint

Constructors

SendError

Server returned error payload

Fields

sendError :: !Text

Desciption of error

sendErrorCode :: !SendErrorCode

Error code

sendErrorId :: !(Maybe Text)

ID of failed message

SendSuccess

Server retunred success payload

Fields

sendSuccId :: !(Maybe Word)

ID of sended message

sendSuccCnt :: !Word

Count of messages sended (huge payloads are splitted)

sendSuccCost :: !(Maybe Text)

Cost of sending

sendSuccBalance :: !(Maybe Text)

Funds of the account left after the call

sendSuccPhones :: !(Maybe [PhoneResp])

Additional info by phone number

data PhoneResp Source

Additional info about phone number

Constructors

PhoneResp 

type SendEndpoint = "sys" :> ("send.php" :> (QueryParam "login" Text :> (QueryParam "psw" Text :> (QueryParam "phones" Text :> (QueryParam "mes" Text :> (QueryParam "id" Text :> (QueryParam "sender" Text :> (QueryParam "translit" Text :> (QueryParam "tinyurl" Text :> (QueryParam "time" Text :> (QueryParam "tz" Text :> (QueryParam "period" Double :> (QueryParam "freq" Word :> (QueryParam "flash" Word :> (QueryParam "bin" Text :> (QueryParam "push" Word :> (QueryParam "hlr" Word :> (QueryParam "ping" Word :> (QueryParam "mms" Word :> (QueryParam "mail" Word :> (QueryParam "call" Word :> (QueryParam "voice" Text :> (QueryParam "param" Text :> (QueryParam "subj" Text :> (QueryParam "charset" Text :> (QueryParam "cost" Word :> (QueryParam "fmt" Word :> (QueryParam "list" Text :> (QueryParam "valid" Text :> (QueryParam "maxsms" Word :> (QueryParam "imgcode" Text :> (QueryParam "userip" Text :> (QueryParam "err" Word :> (QueryParam "op" Word :> (QueryParam "pp" Text :> (ReqBody `[OctetStream]` ByteString :> Post `[JSON]` SendResponse)))))))))))))))))))))))))))))))))))) Source

Endpoint for sending sms, this is low-level most general API that is used to build small helper functions.