Class: ZendeskAPI::Server::App
- Inherits:
-
Sinatra::Base
- Object
- Sinatra::Base
- ZendeskAPI::Server::App
- Defined in:
- lib/zendesk_api/server/base.rb
Instance Method Summary (collapse)
- - (Boolean) '/'(options = {})
-
- (Boolean) '/:object_id'(options = {})
Success of this call.
-
- (Boolean) '/search'(options = {})
Success of this call.
Instance Method Details
- (Boolean) '/'(options = {})
67 68 69 |
# File 'lib/zendesk_api/server/base.rb', line 67 get '/' do haml :index, :format => :html5 end |
- (Boolean) '/:object_id'(options = {})
Success of this call
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/zendesk_api/server/base.rb', line 71 get '/:object_id' do begin @user_request = UserRequest.where(:_id => Moped::BSON::ObjectId(params[:object_id])).first rescue Moped::Errors::InvalidObjectId; end if @user_request params["url"] = @user_request.url @path = @user_request.path @method = @user_request.method @json = @user_request.json @url_params = @user_request.url_params set_request(@user_request.request) unless @user_request.request.empty? set_response(@user_request.response) unless @user_request.response.empty? end haml :index, :format => :html5 end |
- (Boolean) '/search'(options = {})
Success of this call
91 92 93 94 95 96 97 |
# File 'lib/zendesk_api/server/base.rb', line 91 post '/search' do if md = settings.documentation[params[:query]] md[:body] else settings.help end end |