Browse files

Changed the Readme to include a small example of how

to get notifio working inside a python script.

I searched the internet for hours trying to figure out
how to get this module to work after installing it.

I ended up reading to source of another program that had used
notifo and figured it out.

Having to "from notifo import Notifo" to get things working
maked it hard to hit the ground running.

The examples that were originally included all threw errors for me.
  • Loading branch information...
1 parent 882149e commit 7c6373474f0d4d028631ca4c31b342dc639fa48a John Pierman committed Jan 4, 2012
Showing with 16 additions and 6 deletions.
  1. +16 −6 README.rst
@@ -21,16 +21,26 @@ Usage
====== can be imported into any python module::
- import notifo
+ from notifo import Notifo
- notifo.send_notification(login, token, recipient, msg, label, title, uri)
- notifo.send_message(login, token, to, msg)
- notifo.subscribe_user(login, token, user)
+ # create a Notifo object
+ notifo = Notifo('username','apikey') #fill in your username and api key here
-Return data is the parsed json status code::
+ # Tell your object to send a notification
+ notifo.send_notification('to','Message','label','title','uri') #fill in your username
- {u'status': u'success', u'response_code': 2201, u'response_message': u'OK'}
+ # Successful Transmission response
+ # Return data is the parsed json status code::
+ {u'status': u'success', u'response_code': 2201, u'response_message': u'OK'}
+ # Examples of all three methods.
+ notifo.send_notification(recipient, msg, label, title, uri)
+ notifo.send_message(to, msg)
+ notifo.subscribe_user(user)
There is also a cli client included:: -u user -s secret -n name [-m] [-l label] [-t title] [-c callback] [TEXT]

0 comments on commit 7c63734

Please sign in to comment.