Sha256: 927ada40cdc6fc625bc3c6ce230a659e87ea3a68c59cce09b7bc9c1ce5f087a2

Contents?: true

Size: 626 Bytes

Versions: 8

Compression:

Stored size: 626 Bytes

Contents

module Loquor
  class Client
    attr_reader :config

    def initialize
      @config = Configuration.new
    end

    def get(url, options = {})
      deps = {config: @config}
      deps[:should_cache] = options[:cache] if options[:cache]
      HttpAction::Get.get(url, deps)
    end

    def put(url, payload)
      deps = {config: @config}
      HttpAction::Put.put(url, payload, deps)
    end

    def post(url, payload)
      deps = {config: @config}
      HttpAction::Post.post(url, payload, deps)
    end

    def delete(url)
      deps = {config: @config}
      HttpAction::Delete.delete(url, deps)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
loquor-1.13.0 lib/loquor/client.rb
loquor-1.12.0 lib/loquor/client.rb
loquor-1.11.0 lib/loquor/client.rb
loquor-1.10.0 lib/loquor/client.rb
loquor-1.9.0 lib/loquor/client.rb
loquor-1.8.0 lib/loquor/client.rb
loquor-1.7.0 lib/loquor/client.rb
loquor-1.6.0 lib/loquor/client.rb