def download
      connect do |http|
        request = Net::HTTP::Get.new(uri(download_resource))
        request['If-None-Match'] = @etag
        response = http.request(request)

        if check response
          log 'Downloaded translations'
          yield JSON.parse(response.body)
        else
          log 'No new translations'
        end

        @etag = response['ETag']
      end
    end
def download
      connect do |http|
        request = Net::HTTP::Get.new(uri(download_resource))
        request['If-None-Match'] = @etag
        response = http.request(request)

        if check response
          log 'Downloaded translations'
          yield JSON.parse(response.body)
        else
          log 'No new translations'
        end

        @etag = response['ETag']
      end
    end
Usually instantiated from {Configuration#apply}. Copies options.
 @param options [Hash]
 @option options [String] :api_key API key of the project to connect to
 @option options [Fixnum] :port the port to connect to
 @option options [Boolean] :public whether to download draft or published content
 @option options [Fixnum] :http_read_timeout how long to wait before timing out when reading data from the socket
 @option options [Fixnum] :http_open_timeout how long to wait before timing out when opening the socket
 @option options [Boolean] :secure whether to use SSL
 @option options [Logger] :logger where to log transactions
 @option options [String] :ca_file path to root certificate file for ssl verification
 Downloads all blurbs for the given api_key.

 If the +public+ option was set to +true+, this will use published blurbs.
 Otherwise, draft content is fetched.

 The client tracks ETags between download requests, and will return
 without yielding anything if the server returns a not modified response.

 @yield [Hash] downloaded blurbs
 @raise [ConnectionError] if the connection fails