codexa / Zenbone

The Zentext API
http://zentext.codexa.org
2 stars 2 forks source link

Backbone

Backbone is the Zentext API. This API will allow web apps to send messages over text or email. Future versions will allow video conferencing.

Sending Messages

You can send a message by calling zentext.send(a, b, c);.
a is the content (in HTML or Text form).
b is the address to send to.
c is the type of message you are sending. Accepted types are email and mobile.

Note: Not all messaging methods support HTML, on those that do not, Zentext will automatically convert it to Plain Text.

Getting the results of an operation

You can get an operation's results by doing foo = zentext.results(a);.
a tells Zentext how to format the result list. Current values are plain, array and html.

Note: If you do not specify a format, Zentext will return results in a Plain Text format.

Checking the type of an address

You can find out what kind of address a user has entered by doing foo = Zentext.checkType();.
Zentext will return the string 'mobile' if it is a telephone number or 'email' if it is an email.

Testing

These are the required steps to test out the app:

  1. download the latest python 2.7.x release
  2. download the Google App Engine SDK for python for your operating system
  3. for the email functionality:

    1. sign up for manrill
    2. create a new api key
    3. paste the key into a file in the root directory of the repo called key.txt