smsaero

SMSAero API and HTTP client based on servant library.

https://github.com/GetShopTV/smsaero

Version on this page:0.6.2
LTS Haskell 7.24:0.6.2
Stackage Nightly 2016-09-14:0.6.1
Latest on Hackage:0.7.1

See all snapshots smsaero appears in

BSD-3-Clause licensed by Nickolay Kudasov
Maintained by [email protected]
This version can be pinned in stack with:smsaero-0.6.2@sha256:5f1d94528062792c7410216f9f23617ec649a807cbad351bbcda0f37e0df8b6e,1216

Module documentation for 0.6.2

smsaero

Hackage Build Status

SMSAero API and HTTP client based on servant library.

Documentation

Library documentation is available on Hackage.

The original SMSAero API documentation (in Russian) is available here.

API documentation in English can be generated using pandoc:

$ stack exec pandoc --filter=docs/api-filter.hs -o docs/api.md api-intro.md

Note that you can generate this documentation in any format that pandoc supports (e.g. HTML, LaTeX, Markdown, etc.).

Usage

Import SMSAero and Control.Monad.Trans.Either module to interact with SMSAero:

>>> :s -XOverloadedStrings
>>> import SMSAero
>>> import Control.Monad.Trans.Either
>>> let credentials = SMSAeroAuth "[email protected]" "md5-password-hash"
>>> runEitherT $ smsAeroBalance credentials
Right (ResponseOK (BalanceResponse 10.0))

Contributing

Contributions and bug reports are welcome!

GetShopTV Team

Changes

0.6.2

  • Get rid of SmsAeroJson (they have finally fixed their Content-Type!). See 5a7539e.

0.6.1

  • Fix SmsAeroBalance ToJSON/FromJSON instances.

0.6

  • Change client function types (see #11).

0.5

  • Switch to servant-0.7 (see #5);
  • Update to the latest SMSAero API (see #7 and #9 and #10):
    • Add type parameter;
    • Add groups, contacts and blacklist API;
    • Add API for tarif and message status checking.

0.4.1

  • Add Eq instances

0.4

  • Rename StatusResponse to MessageStatus and add instance Read
  • Change MessageId representation to Int64
  • Change Phone representation to Int64

0.3

  • Add MessageBody newtype for "text" query parameter
  • Add instances for automatic API documentation via servant-docs
  • Add filter for Pandoc to generate documentation in many formats
  • Fix some ToJSON instances to match FromJSON
  • Add ToJSON/FromJSON instances for SMSAeroAuth

0.2

  • Structure haddock documentation
  • Add missing ToJSON and FromText instances

0.1.1

  • Add support for GHC 7.8