lib/sdk4me/client.rb in 4me-sdk-2.0.4 vs lib/sdk4me/client.rb in 4me-sdk-2.0.6

- old
+ new

@@ -70,11 +70,11 @@ @ssl, @domain, @port = ssl_domain_port_path(option(:host)) unless option(:access_token).present? if option(:api_token).blank? raise ::Sdk4me::Exception, 'Missing required configuration option access_token' else - @logger.info('DEPRECATED: Use of api_token is deprecated, switch to using access_token instead. -- https://developer.4me.com/v1/#authentication') + @logger.info { 'DEPRECATED: Use of api_token is deprecated, switch to using access_token instead. -- https://developer.4me.com/v1/#authentication' } end end @ssl_verify_none = options[:ssl_verify_none] end @@ -86,10 +86,10 @@ # Yield all retrieved resources one-by-one for the given (paged) API query. # Raises an ::Sdk4me::Exception with the response retrieved from 4me is invalid # Returns total nr of resources yielded (for logging) def each(path, params = {}, header = {}, &block) # retrieve the resources using the max page size (least nr of API calls) - next_path = expand_path(path, { per_page: MAX_PAGE_SIZE, page: 1 }.merge(params)) + next_path = expand_path(path, { per_page: MAX_PAGE_SIZE }.merge(params)) size = 0 while next_path # retrieve the records (with retry and optionally wait for rate-limit) response = get(next_path, {}, header) # raise exception in case the response is invalid