Popularity
1.0
Declining
Activity
0.0
Stable
0
2
0

Monthly Downloads: 8
Programming language: Haskell
License: MIT License
Tags: API    

messente alternatives and similar packages

Based on the "API" category.
Alternatively, view messente alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of messente or a related project?

Add another 'API' Package

README

messente-haskell

Non-official Messente.com SMS gateway API wrapper for Haskell.

API documentation: https://messente.com/documentation/setup-and-activation

Features:

  • Only https is used.
  • Uses backup server automatically.
  • Delivery report server included.

Missing features:

  • No credits API
  • No pricing API
  • Can't provide special parameters for sms like time_to_send, validity, dlr-url etc.

Usage

Example code sends sms and waits for delivery raport (doesn't exit). To get delivery raport, you must configure it from http://www.messente.com/ API setup.

import Messente

smsSend = send "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
main = do
  -- If from is Nothing then messente default 'From' is used
  -- (configured from API setup at messente.com)
  result <- smsSend Nothing "+00000000000" "my first sms"
  putStrLn $ case result of
    Right id -> "sms sent, id: " ++ id
    Left (errNo, errStr) -> "not sent: " ++ show errNo ++ ", " ++ errStr

  -- star http server to get delivery feedback (must configure at messente.com)
  -- this function doesn't return (runs forever)
  listen 9000 delivery

delivery :: Delivery -> IO ()
delivery del = putStrLn $
  case del of
    Delivered id  -> "delivered: " ++ id
    DeliveryError id errNo errStr -> "not delivered: " ++ id ++ " (" ++ errStr ++ ")"
    DeliveryProgress id status    -> "progress: "      ++ id ++ " (" ++ status ++ ")"