pushbullet_ruby 1.0.4.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8661c5a70c242540dc4946783bb13cc088272a97
4
- data.tar.gz: 5b376296f4b5a23778e178b3a46ad6db5e9400c3
3
+ metadata.gz: 1782f0070fb89da640d4ffe888f6285e4fa715b5
4
+ data.tar.gz: 320705719e4a41e51d50c1a443d7ceefced7d776
5
5
  SHA512:
6
- metadata.gz: 3b03234453ce1052a263247cb8f53a00683d9d8a8963afa8b51f3880f26400ea7a6b4d4529c87dd99dc91e90b3e39c33f6e92c4cd84b2cc60f274bbf60424d71
7
- data.tar.gz: f97e701fa0ed7a0f3115196ea788d5a2d595f77047ea61fcd1a2c20762c1bbe195502672dc26ccf58af4acd34db3b39644c1194955ddb41fa90be8e20862fa05
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
- id: 'device id',
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
- identifier: 'devide id',
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
- user_identifier: 'user id',
79
- device_identifier: 'device id',
78
+ user_id: 'user id',
79
+ device_id: 'device id',
80
80
  params: {
81
81
  conversation_iden: 'target phone number',
82
82
  message: 'Content'
@@ -12,6 +12,10 @@ module PushbulletRuby
12
12
  def delete_chat(chat_id: nil)
13
13
  delete("/v2/chats/#{chat_id}").body
14
14
  end
15
+
16
+ def update_chat(chat_id: nil, params: {})
17
+ PushbulletRuby::Chat.new(post("/v2/chats/#{chat_id}", params).body)
18
+ end
15
19
  end
16
20
  end
17
21
  end
@@ -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
@@ -1,3 +1,3 @@
1
1
  module PushbulletRuby
2
- VERSION = "1.0.4.1"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pushbullet_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - creends