Permalink
Browse files

Merge pull request #5 from haqthat/master

Changed the Readme to include a small example of how
  • Loading branch information...
2 parents 882149e + 7c63734 commit 26079db3b40c26661155af20a9f16a0eca06dbde @mrtazz committed Oct 20, 2012
Showing with 16 additions and 6 deletions.
  1. +16 −6 README.rst
View
@@ -21,16 +21,26 @@ Usage
======
notifo.py 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::
notifo_cli.py -u user -s secret -n name [-m] [-l label] [-t title] [-c callback] [TEXT]

0 comments on commit 26079db

Please sign in to comment.