pushbullet_ruby 1.0.4 → 1.0.4.1
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 +4 -4
- data/README.md +13 -8
- data/lib/pushbullet_ruby/api/devices.rb +2 -2
- data/lib/pushbullet_ruby/api/pushes.rb +6 -6
- data/lib/pushbullet_ruby/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8661c5a70c242540dc4946783bb13cc088272a97
|
4
|
+
data.tar.gz: 5b376296f4b5a23778e178b3a46ad6db5e9400c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b03234453ce1052a263247cb8f53a00683d9d8a8963afa8b51f3880f26400ea7a6b4d4529c87dd99dc91e90b3e39c33f6e92c4cd84b2cc60f274bbf60424d71
|
7
|
+
data.tar.gz: f97e701fa0ed7a0f3115196ea788d5a2d595f77047ea61fcd1a2c20762c1bbe195502672dc26ccf58af4acd34db3b39644c1194955ddb41fa90be8e20862fa05
|
data/README.md
CHANGED
@@ -1,14 +1,11 @@
|
|
1
1
|
# PushbulletRuby
|
2
|
-
|
2
|
+
[](https://badge.fury.io/rb/pushbullet_ruby)
|
3
3
|
## Installation
|
4
|
-
|
5
4
|
Add this line to your application's Gemfile:
|
6
|
-
|
7
5
|
```ruby
|
8
6
|
gem 'pushbullet_ruby'
|
9
7
|
```
|
10
8
|
## Usage
|
11
|
-
|
12
9
|
### Setup
|
13
10
|
Puts your api-key into a token.json file formatted like this:
|
14
11
|
```ruby
|
@@ -18,7 +15,6 @@ And setup your client:
|
|
18
15
|
```ruby
|
19
16
|
client = PushbulletRuby::Client.new(PushbulletRuby::Token.load)
|
20
17
|
```
|
21
|
-
|
22
18
|
### List devices
|
23
19
|
```ruby
|
24
20
|
client.devices
|
@@ -36,6 +32,18 @@ client.update_device(
|
|
36
32
|
```ruby
|
37
33
|
client.contacts
|
38
34
|
```
|
35
|
+
### List chats
|
36
|
+
```ruby
|
37
|
+
client.chats
|
38
|
+
```
|
39
|
+
### Create chat
|
40
|
+
```ruby
|
41
|
+
client.create_chat(
|
42
|
+
params: {
|
43
|
+
email: 'target email'
|
44
|
+
}
|
45
|
+
)
|
46
|
+
```
|
39
47
|
### List subscriptions(channels)
|
40
48
|
```ruby
|
41
49
|
client.subscriptions
|
@@ -76,10 +84,7 @@ client.sens_sms(
|
|
76
84
|
)
|
77
85
|
```
|
78
86
|
## Contributing
|
79
|
-
|
80
87
|
Bug reports and pull requests are welcome on GitHub at https://github.com/creends/pushbullet_ruby.
|
81
|
-
|
82
|
-
|
83
88
|
##### This gem is inspired by [washbullet](https://github.com/hrysd/washbullet)
|
84
89
|
|
85
90
|
|
@@ -5,8 +5,8 @@ module PushbulletRuby
|
|
5
5
|
PushbulletRuby::Device.from_responce(get('/v2/devices'))
|
6
6
|
end
|
7
7
|
|
8
|
-
def update_device(
|
9
|
-
PushbulletRuby::Device.new(post("/v2/devices/#{
|
8
|
+
def update_device(device_id: nil, params: {})
|
9
|
+
PushbulletRuby::Device.new(post("/v2/devices/#{device_id}", params).body)
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
@@ -6,16 +6,16 @@ require 'pushbullet_ruby/pushable/file'
|
|
6
6
|
module PushbulletRuby
|
7
7
|
module API
|
8
8
|
module Pushes
|
9
|
-
def push_note(receiver: nil,
|
10
|
-
PushbulletRuby::Pushable::Note.push(self, receiver,
|
9
|
+
def push_note(receiver: nil, id: nil, params: {})
|
10
|
+
PushbulletRuby::Pushable::Note.push(self, receiver, id, params)
|
11
11
|
end
|
12
12
|
|
13
|
-
def push_link(receiver: nil,
|
14
|
-
PushbulletRuby::Pushable::Link.push(self, receiver,
|
13
|
+
def push_link(receiver: nil, id: nil, params: {})
|
14
|
+
PushbulletRuby::Pushable::Link.push(self, receiver, id, params)
|
15
15
|
end
|
16
16
|
|
17
|
-
def push_file(receiver: nil,
|
18
|
-
PushbulletRuby::Pushable::File.push(self, receiver,
|
17
|
+
def push_file(receiver: nil, id: nil, params: {})
|
18
|
+
PushbulletRuby::Pushable::File.push(self, receiver, id, params)
|
19
19
|
end
|
20
20
|
|
21
21
|
def pushes
|