Skip to content
Browse files

added label parameter to post - suggested by Euwyn Poon

  • Loading branch information...
1 parent 07f0e19 commit 3d1a362849a2b1133769acfb1bb213b554e0785a @jot committed Jul 5, 2010
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/notifo.rb
View
5 lib/notifo.rb
@@ -26,8 +26,9 @@ def subscribe_user(username)
# Optional Parameters
# title - name of "notification event"
# uri - the uri that will be loaded when the notification is opened; if specified, must be urlencoded; if a web address, must start with http:// or https://
- def post(username, msg, title=nil, uri=nil)
- options = { :body => {:to => username, :msg => msg, :title=>title, :uri=>uri}, :basic_auth => @auth }
+ # label - label describing the "application" (used only if being sent from a User account; the Service label is automatically applied if being sent from a Service account)
+ def post(username, msg, title=nil, uri=nil, label=nil)
+ options = { :body => {:to => username, :msg => msg, :label=>title, :title=>title, :uri=>uri}, :basic_auth => @auth }
self.class.post('/send_notification', options)
end

0 comments on commit 3d1a362

Please sign in to comment.
Something went wrong with that request. Please try again.