noti 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/noti/notification.rb +3 -3
- data/lib/noti/request.rb +1 -1
- data/lib/noti/version.rb +1 -1
- metadata +4 -4
data/lib/noti/notification.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Noti
|
2
2
|
class Notification
|
3
3
|
|
4
|
-
attr_accessor :title, :
|
4
|
+
attr_accessor :title, :text, :sound, :url, :image
|
5
5
|
|
6
6
|
def deliver_to(user)
|
7
7
|
data = {
|
@@ -9,10 +9,10 @@ module Noti
|
|
9
9
|
:user => user,
|
10
10
|
:notification => {
|
11
11
|
:title => self.title,
|
12
|
-
:sub_title => self.sub_title,
|
13
12
|
:text => self.text,
|
14
13
|
:url => self.url,
|
15
|
-
:sound => self.sound
|
14
|
+
:sound => self.sound,
|
15
|
+
:image => self.image
|
16
16
|
}
|
17
17
|
}
|
18
18
|
Noti::Request.request('add', data) && true
|
data/lib/noti/request.rb
CHANGED
@@ -24,7 +24,7 @@ module Noti
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def make
|
27
|
-
uri = URI.parse(["
|
27
|
+
uri = URI.parse(["https://notiapp.com", "api/v1", @path].join('/'))
|
28
28
|
http_request = http_class.new(uri.request_uri)
|
29
29
|
http_request.initialize_http_header({"User-Agent" => "NotiRubyClient/#{Noti::VERSION}"})
|
30
30
|
http_request.content_type = 'application/json'
|
data/lib/noti/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: noti
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-08-
|
12
|
+
date: 2012-08-23 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|
16
|
-
requirement: &
|
16
|
+
requirement: &70112506025680 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70112506025680
|
25
25
|
description:
|
26
26
|
email: adam@atechmedia.com
|
27
27
|
executables: []
|