Sha256: 84346fb4c438392b9606ef88be1568c54990af12863c0aff98cbd80f2b222f67
Contents?: true
Size: 845 Bytes
Versions: 2
Compression:
Stored size: 845 Bytes
Contents
# encoding: utf-8 # This file is distributed under New Relic"s license terms. # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details. require 'grape' class GrapeTestApiError < StandardError; end class GrapeTestApi < Grape::API # namespace, group, resource, and resources all do the same thing. # They are aliases for namespace. get :self_destruct do raise GrapeTestApiError.new("I'm sorry Dave, I'm afraid I can't do that.") end namespace :grape_ape do get do 'List grape apes!' end get ':id' do 'Show grape ape!' end end resource :grape_ape do post do 'Create grape ape!' end end resources :grape_ape do put ':id' do 'Update grape ape!' end end group :grape_ape do delete ':id' do 'Destroy grape ape!' end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
newrelic_rpm-3.9.9.275 | test/multiverse/suites/grape/grape_test_api.rb |
newrelic_rpm-3.9.8.273 | test/multiverse/suites/grape/grape_test_api.rb |