Sha256: bbf75397dcf314d4e89855899576ad9708fdbc9cac8b0e5a6064ba79e4c233df

Contents?: true

Size: 697 Bytes

Versions: 2

Compression:

Stored size: 697 Bytes

Contents

require 'faraday'
require 'faraday/http_cache'
require 'faraday_middleware'
require_relative 'middleware/user_id'
require_relative 'middleware/exceptions'

module Plaza
  class Request
    attr_accessor :client, :connection
    attr_reader :logger

    def initialize(config_sym= :default)
      @connection = Plaza.connection(config_sym)
      @logger = Plaza.configuration(config_sym).logger
    end

    def get(*args)
      Response.new(connection.get *args)
    end

    def post(*args)
      Response.new(connection.post *args)
    end

    def put(*args)
      Response.new(connection.put *args)
    end

    def delete(*args)
      Response.new(connection.delete *args)
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
plaza-0.1.1 lib/plaza/request.rb
plaza-0.1.0 lib/plaza/request.rb