-
-
Notifications
You must be signed in to change notification settings - Fork 73
Open
Labels
Description
Coming from #150 (comment), document how to add a RESTful API.
This monkey-patching should work:
module SlackRubyBotServer
module Api
module Endpoints
class MyEndpoint < Grape::API
get 'foobar' do
{ ok: true }
end
end
class RootEndpoint < Grape::API
mount MyEndpoint
end
end
end
endWe should document, and possibly implement a cleaner way to do this.
It's a bit of a rabbit hole. The root endpoint is https://github.com/slack-ruby/slack-ruby-bot-server/blob/master/lib/slack-ruby-bot-server/api/endpoints/root_endpoint.rb, invoked from
| Endpoints::RootEndpoint.call(env) |
| def self.instance |
Altonymous and lingzhang-lyonAltonymous and lingzhang-lyon