The servant-smsc-ru package

[Tags:bsd3, library, test]

Please see README.md


[Skip to Readme]

Properties

Versions 0.1.0.0
Change log CHANGELOG.md
Dependencies aeson (==0.11.*), base (>=4.7 && <5), bytestring (==0.10.*), http-client (>=0.4 && <0.6), http-client-tls (>=0.2 && <0.4), mtl (==2.2.*), scientific (==0.3.*), servant (>=0.7 && <0.9), servant-client (>=0.7 && <0.9), text (>=1.2 && <2), transformers (>=0.4 && <0.6) [details]
License BSD3
Copyright 2016 Anton Gushcha
Author Anton Gushcha
Maintainer ncrashed@gmail.com
Category Web
Home page https://github.com/NCrashed/servant-smsc-ru#readme
Source repository head: git clone https://github.com/NCrashed/servant-smsc-ru
Uploaded Thu Aug 4 18:53:18 UTC 2016 by NCrashed
Distributions NixOS:0.1.0.0
Downloads 55 total (4 in the last 30 days)
Votes
0 []
Status Docs available [build log]
Last success reported on 2016-08-04 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Readme for servant-smsc-ru

Readme for servant-smsc-ru-0.1.0.0

servant-smsc-ru

Build Status

These are bindings to https://smsc.ru service for sending SMS/MMS message to cell phones.

How to use

The general API is provided by genericSmsSend function, but it is too overengineered to be used as is. Thats why several simplified wrappers are presented.

First, you need to provide SmscConfig value:

cfg <- defaultSmscConfig
let testSmscConfig = cfg {
        smscLogin = "mylogin"
      , smscPassword = "mypass"
      }

After that you can send a SMS:

res <- simpleSmsSend testSmscConfig testPhone "Test message"
case res of 
  Left er -> printLn $ "message sending: " ++ show er
  Right _ -> return ()

Or check how much it would cost to you:

res <- getSimpleSmsCost testSmscConfig testPhone "Test message"
case res of 
  Left er -> assertFailure $ "message costing: " <> show er
  Right v -> putStrLn $ "message cost: " <> show v