Sha256: 0b0aa5e722d48b21150dd889fe28c1b8b706d4549e9496aeec6ab70d4b8c5a51

Contents?: true

Size: 488 Bytes

Versions: 3

Compression:

Stored size: 488 Bytes

Contents

module QPush
  module Web
    class Server < Sinatra::Base
      before do
        content_type :json
      end

      get '/stats' do
        Get.stats.to_json
      end

      get '/delays' do
        Get.delays(params[:start].to_i, params[:end].to_i).to_json
      end

      get '/crons' do
        Get.crons(params[:start].to_i, params[:end].to_i).to_json
      end

      get '/fails' do
        Get.fails(params[:start].to_i, params[:end].to_i).to_json
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
qpush-0.1.2 lib/qpush/web/server.rb
qpush-0.1.1 lib/qpush/web/server.rb
qpush-0.1.0 lib/qpush/web/server.rb