pushbullet_client 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pushbullet/client.rb +5 -2
- data/lib/pushbullet/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83e5f94556f66fdad7d641f0a6b8bb5ce9d0add7c656b7c1cdebd9ff2da519b6
|
4
|
+
data.tar.gz: d799ac4ee79f89524ed9cf45bd96357363e79c2ae1b6293dd4ecf08bcb21081e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2252837846568ff01b37094f4f1d6172e3cee7da0223db8b8990bac17fe3e20bd5e9fedf7880b14671dcd002c93d111b4aa4b455997a64de4474a0b23a0f6221
|
7
|
+
data.tar.gz: 79ab13c24299baa6bd57eaf11fb463408704443352b3eaaf7957eb2d05a7f372e2b5b4498146c35f26a5d126f630b61a57575c0a42373f23f8dee74cec206fc7
|
data/lib/pushbullet/client.rb
CHANGED
@@ -23,10 +23,11 @@ module Pushbullet
|
|
23
23
|
|
24
24
|
attr_reader :key, :secret, :base_path, :port
|
25
25
|
|
26
|
-
def initialize(access_token:, base_path: API_V2_BASE_PATH, port: 80)
|
26
|
+
def initialize(access_token:, base_path: API_V2_BASE_PATH, port: 80, limit: 500)
|
27
27
|
@access_token = access_token
|
28
28
|
@base_path = base_path
|
29
29
|
@port = port
|
30
|
+
@limit = limit
|
30
31
|
end
|
31
32
|
|
32
33
|
def self.compatible_api_version
|
@@ -43,6 +44,8 @@ module Pushbullet
|
|
43
44
|
def authorise_and_send(http_method:, path:, payload: {}, params: {})
|
44
45
|
start_time = micro_second_time_now
|
45
46
|
|
47
|
+
params['limit'] = @limit
|
48
|
+
|
46
49
|
response = HTTParty.send(
|
47
50
|
http_method.to_sym,
|
48
51
|
construct_base_path(path, params),
|
@@ -104,7 +107,7 @@ module Pushbullet
|
|
104
107
|
def construct_base_path(path, params)
|
105
108
|
constructed_path = "#{base_path}/#{path}"
|
106
109
|
|
107
|
-
if params
|
110
|
+
if params == {}
|
108
111
|
constructed_path
|
109
112
|
else
|
110
113
|
"#{constructed_path}?#{process_params(params)}"
|
data/lib/pushbullet/version.rb
CHANGED