pushbullet_ruby 1.0.4.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1782f0070fb89da640d4ffe888f6285e4fa715b5
|
4
|
+
data.tar.gz: 320705719e4a41e51d50c1a443d7ceefced7d776
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4349bb4359cf1422c3710b1532ea4fff37c9f327d1347c5652f699ab79c61954fd0f3792ad15c1aa284957e7fd696d5224474f0cfff1ad8d34672391aeda596
|
7
|
+
data.tar.gz: 7ba919a185f18d075745d6c0133843fc398178c026377ad5e4502418940fee5608d511128458cf184d77c61143de1e9e6fe8bfeadc21941f18e4692e43c7a7a0
|
data/README.md
CHANGED
@@ -22,7 +22,7 @@ client.devices
|
|
22
22
|
### Update device informations
|
23
23
|
```ruby
|
24
24
|
client.update_device(
|
25
|
-
|
25
|
+
device_id: 'device id',
|
26
26
|
params: {
|
27
27
|
nickname: 'device name'
|
28
28
|
}
|
@@ -65,7 +65,7 @@ You can send following list:
|
|
65
65
|
```ruby
|
66
66
|
client.push_note(
|
67
67
|
receiver: :device,
|
68
|
-
|
68
|
+
id: 'target id',
|
69
69
|
params: {
|
70
70
|
title: 'Title',
|
71
71
|
body: 'Content'
|
@@ -75,8 +75,8 @@ client.push_note(
|
|
75
75
|
### Sms
|
76
76
|
```ruby
|
77
77
|
client.sens_sms(
|
78
|
-
|
79
|
-
|
78
|
+
user_id: 'user id',
|
79
|
+
device_id: 'device id',
|
80
80
|
params: {
|
81
81
|
conversation_iden: 'target phone number',
|
82
82
|
message: 'Content'
|
@@ -8,6 +8,14 @@ module PushbulletRuby
|
|
8
8
|
def update_device(device_id: nil, params: {})
|
9
9
|
PushbulletRuby::Device.new(post("/v2/devices/#{device_id}", params).body)
|
10
10
|
end
|
11
|
+
|
12
|
+
def create_device(params: {})
|
13
|
+
PushbulletRuby::Device.new(post('/v2/devices', params).body)
|
14
|
+
end
|
15
|
+
|
16
|
+
def delete_device(device_id: nil)
|
17
|
+
delete("/v2/devices/#{device_id}").body
|
18
|
+
end
|
11
19
|
end
|
12
20
|
end
|
13
21
|
end
|
@@ -21,6 +21,18 @@ module PushbulletRuby
|
|
21
21
|
def pushes
|
22
22
|
PushbulletRuby::Push.from_response(get('/v2/pushes'))
|
23
23
|
end
|
24
|
+
|
25
|
+
def update_push(push_id: nil, params: {})
|
26
|
+
PushbulletRuby::Push.new(post("/v2/pushes/#{push_id}", params).body)
|
27
|
+
end
|
28
|
+
|
29
|
+
def delete_push(push_id: nil)
|
30
|
+
delete("/v2/pushes/#{push_id}").body
|
31
|
+
end
|
32
|
+
|
33
|
+
def delete_all_pushes
|
34
|
+
delete('/v2/pushes').body
|
35
|
+
end
|
24
36
|
end
|
25
37
|
end
|
26
38
|
end
|
@@ -16,6 +16,18 @@ module PushbulletRuby
|
|
16
16
|
memo << PushbulletRuby::Push.new(push)
|
17
17
|
end
|
18
18
|
end
|
19
|
+
|
20
|
+
def update_subscription(channel_id: nil, params: {})
|
21
|
+
PushbulletRuby::Channel.new(post("/v2/subscriptions/#{channel_id}", params).body)
|
22
|
+
end
|
23
|
+
|
24
|
+
def delete_subscription(channel_id: nil)
|
25
|
+
delete("/v2/subscriptions/#{channel_id}").body
|
26
|
+
end
|
27
|
+
|
28
|
+
def create_subscription(params: {})
|
29
|
+
PushbulletRuby::Channel.new(post('/v2/subscriptions', params))
|
30
|
+
end
|
19
31
|
end
|
20
32
|
end
|
21
33
|
end
|