Sha256: 42754cbaa15b447365a2df1f1183f4d9c2853063f8cbde44b6cfde8629e79b16

Contents?: true

Size: 479 Bytes

Versions: 5

Compression:

Stored size: 479 Bytes

Contents

# frozen_string_literal: true

module ActionTracker
  module HttpGateway
    protected

    def request(path)
      Connection.new.get(path)
    end

    def response
      @response ||= Connection.new.get(@path)
    end

    def processed_path(collection_name, params)
      [collection_name, params.to_query].reject(&:blank?).compact.join('?')
    end

    def parse_response(response)
      ActionTracker::CollectionProxy.new response, self.class.model_name
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
action_tracker_client-0.1.8 lib/action_tracker/utils/http_gateway.rb
action_tracker_client-0.1.7 lib/action_tracker/utils/http_gateway.rb
action_tracker_client-0.1.6 lib/action_tracker/utils/http_gateway.rb
action_tracker_client-0.1.5 lib/action_tracker/utils/http_gateway.rb
action_tracker_client-0.1.4 lib/action_tracker/utils/http_gateway.rb