pushbullet_client 0.0.16 → 0.0.18

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
  SHA256:
3
- metadata.gz: 2e1fca78108d565ec472e71336c798cc9341403ff1f3a0d6800acaa81eeb3620
4
- data.tar.gz: bddc924d7c0595cf2e2cc8045d9d12871ba8a4c71147e65b9f59a90baed70421
3
+ metadata.gz: f238840facbb7840b6fcd238bd64ff2e0d4277a9c499b0eb0f528e7ed9d883c5
4
+ data.tar.gz: 7ef9c68fb3da2d989e5a22c3819a758c78ebdbdbd275c60a1f5bb4bc6f87b598
5
5
  SHA512:
6
- metadata.gz: a6d9190de8f8ec1f8a5dfd43c57c229fc3c77250afc9424e98a11d77b28289b3799344eb8d918261b2a18f273af53b360c1cc0cf0ac9087e87f0d3ccc57821b6
7
- data.tar.gz: f4e0769922efd2a086b16bfc74dcc6fdd69e5b023e3349730db6498838b7214575e1aba6cf822c7164242f17cbfedcc03de92ad26ba0a9ef2ea102afd82cef6b
6
+ metadata.gz: 7ca774d6b8a91aa135b986c93deb5c04ae0a00a56341dd42db5e531d57f614c698d4b89e33e1b44c7961059fd75222facc23161501be114f326be07f23a5c6e9
7
+ data.tar.gz: 52cdcf3fd553d92598f602b757694b74348271eee69c42ca4ee1fb96683f68523aa72fef30ecc2fbacd0adde83f290b7f2cf31bbc9a3377959f243dc2d11de59
@@ -21,14 +21,15 @@ module Pushbullet
21
21
  # TODO: Date parsing
22
22
  # TODO: Create api client creation library
23
23
 
24
- attr_reader :key, :secret, :base_path, :port
24
+ attr_reader :key, :secret, :base_path, :port, :timeout
25
25
 
26
- def initialize(access_token:, base_path: API_V2_BASE_PATH, port: 80, limit: 500)
26
+ def initialize(access_token:, base_path: API_V2_BASE_PATH, port: 80, limit: 500, timeout: 1000)
27
27
  @access_token = access_token
28
28
  @base_path = base_path
29
29
  @port = port
30
30
  @limit = limit
31
31
  @disable_limit = false # Used internally for permanents calls
32
+ @timeout = timeout
32
33
  end
33
34
 
34
35
  def self.compatible_api_version
@@ -55,7 +56,7 @@ module Pushbullet
55
56
 
56
57
  begin
57
58
  response = send_request(http_method, path, params, payload)
58
- rescue => Socket::ResolutionError
59
+ rescue
59
60
  # Retry once
60
61
  # TODO: Add in retry amounts
61
62
  response = send_request(http_method, path, params, payload)
@@ -75,7 +76,8 @@ module Pushbullet
75
76
  'Content-Type': 'application/json'
76
77
  },
77
78
  port: port,
78
- format: :json
79
+ format: :json,
80
+ timeout: timeout
79
81
  )
80
82
  end
81
83
 
@@ -1,3 +1,3 @@
1
1
  module Pushbullet
2
- VERSION = "0.0.16"
2
+ VERSION = "0.0.18"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pushbullet_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - trex22