bemurphy / messagepub-erlang

Simple gen_server client to send messages via messagepub

Home Page:http://messagepub.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is a simple gen_server node to send messages on AIM, Google Chat, Email, SMS, or Twitter using messagepub.

It is very easy to use:

  1. Sign up for an account at messagepub.com

  2. Once you've signed up, get your API key by going to your Account Settings at messagepub.com.

  3. Compile messagepub.erl. Don't forget to rr("messagepub.hrl") for records if in shell.

c(messagepub).
rr("messagepub.hrl").
  1. Start the gen_server with your API KEY:
messagepub:start_link("YOUR API KEY").
  1. Build a list of recipients you wish to send to. Order of recipients is used as the position in messagepub.
Recipients = [messagepub:email_recipient("joe@example.com"), messagepub:sms_recipient("123456789")].

Available helpers for building recipients are twitter_recipient/1, gchat_recipient/1, aim_recipient/1, email_recipient/1, sms_recipient/1, phone_recipient/1.

  1. Build and send your notification:
Notification = messagepub:new_notification("Your message here!", Recipients).
messagepub:create(Notification).

Supported calls to api through: create/1, view/0, get_notification/1, cancel/1, replies/0

About

Simple gen_server client to send messages via messagepub

http://messagepub.com


Languages

Language:Erlang 100.0%