forked from griffin-stewie/ruby_gntp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
43 lines (33 loc) · 894 Bytes
/
README
File metadata and controls
43 lines (33 loc) · 894 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Ruby library for GNTP(Growl Notification Transport Protocol)
Sorry, document is not avilable now.
Priority level mappings
2 Emergency
1 High
0 Normal
-1 Moderate
-2 Very Low
Usage example:
require 'rubygems'
require 'ruby_gntp'
# -- Standard way
growl = GNTP.new("Ruby/GNTP self test")
growl.register({:notifications => [{
:name => "notify",
:enabled => true,
}]})
growl.notify({
:name => "notify",
:title => "Congraturation",
:text => "Congraturation! You are successful install ruby_gntp.",
:icon => "http://www.hatena.ne.jp/users/sn/snaka72/profile.gif",
:sticky=> true,
:priority => 2
})
# -- Instant notification
GNTP.notify({
:app_name => "Instant notify",
:title => "Instant notification",
:text => "Instant notification available now.",
:icon => "http://www.hatena.ne.jp/users/sn/snaka72/profile.gif",
:priority => 2
})