lib/pushbullet/client.rb in pushbullet_client-0.0.12 vs lib/pushbullet/client.rb in pushbullet_client-0.0.13
- old
+ new
@@ -26,10 +26,11 @@
def initialize(access_token:, base_path: API_V2_BASE_PATH, port: 80, limit: 500)
@access_token = access_token
@base_path = base_path
@port = port
@limit = limit
+ @disable_limit = false # Used internally for permanents calls
end
def self.compatible_api_version
'v2'
end
@@ -46,10 +47,12 @@
if params.nil? || params.empty?
params = {}
end
- params['limit'] = @limit
+ unless @disable_limit
+ params['limit'] = @limit
+ end
response = HTTParty.send(
http_method.to_sym,
construct_base_path(path, params),
body: payload,