lib/pushbullet/client.rb in pushbullet_client-0.0.17 vs lib/pushbullet/client.rb in pushbullet_client-0.0.18

- old
+ new

@@ -19,18 +19,19 @@ # TODO: Pagination # TODO: Limits # TODO: Date parsing # TODO: Create api client creation library - attr_reader :key, :secret, :base_path, :port + attr_reader :key, :secret, :base_path, :port, :timeout - def initialize(access_token:, base_path: API_V2_BASE_PATH, port: 80, limit: 500) + def initialize(access_token:, base_path: API_V2_BASE_PATH, port: 80, limit: 500, timeout: 1000) @access_token = access_token @base_path = base_path @port = port @limit = limit @disable_limit = false # Used internally for permanents calls + @timeout = timeout end def self.compatible_api_version 'v2' end @@ -73,10 +74,11 @@ headers: { 'Access-Token': @access_token, 'Content-Type': 'application/json' }, port: port, - format: :json + format: :json, + timeout: timeout ) end def construct_response_object(response, path, start_time, end_time) {