Class: Codelocks::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/codelocks/request.rb

Class Method Summary collapse

Class Method Details

.create(path, params = {}) ⇒ Codelocks::NetCode::Response

Perform a request against the NetCode API


11
12
13
14
15
16
17
# File 'lib/codelocks/request.rb', line 11

def create(path, params = {})
  response = Codelocks.connection.get(path, default_params.merge(params)) do |req|
    req.headers['x-api-key'] = Codelocks.api_key
  end

  Response.new(response)
end