Sha256: 0244aa6c6353dc19990dd0492bea87e5e8c5852071c9b53ccad515c2f554b347

Contents?: true

Size: 847 Bytes

Versions: 23

Compression:

Stored size: 847 Bytes

Contents

module Rhoconnect
  module Controller  
    class ReadStateController < Rhoconnect::Controller::APIBase
      set_default :admin_required, true
      set_default :login_required, false
      set_default :source_required, false
      set_default :client_required, false

      register Rhoconnect::EndPoint
      
      put "/users/:user_name/sources/:source_name", \
                  :deprecated_route => {:verb => :post, :url => ['/api/set_refresh_time', '/api/source/set_refresh_time']} do
        source = Source.load(params[:source_name],
          {:app_id => APP_NAME, :user_id => params[:user_name]})
        source.poll_interval = params[:poll_interval] if params[:poll_interval]
        params[:refresh_time] ||= 0
        source.read_state.refresh_time = Time.now.to_i + params[:refresh_time].to_i
        ''
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
rhoconnect-7.6.0 lib/rhoconnect/controller/read_state_controller.rb
rhoconnect-7.5.1 lib/rhoconnect/controller/read_state_controller.rb
rhoconnect-7.4.1 lib/rhoconnect/controller/read_state_controller.rb
rhoconnect-7.1.17 lib/rhoconnect/controller/read_state_controller.rb
rhoconnect-6.2.0 lib/rhoconnect/controller/read_state_controller.rb
rhoconnect-6.0.11 lib/rhoconnect/controller/read_state_controller.rb
rhoconnect-5.5.18 lib/rhoconnect/controller/read_state_controller.rb
rhoconnect-5.5.17 lib/rhoconnect/controller/read_state_controller.rb
rhoconnect-5.5.15 lib/rhoconnect/controller/read_state_controller.rb
rhoconnect-5.5.0.22 lib/rhoconnect/controller/read_state_controller.rb
rhoconnect-5.5.2 lib/rhoconnect/controller/read_state_controller.rb
rhoconnect-5.5.0.7 lib/rhoconnect/controller/read_state_controller.rb
rhoconnect-5.5.0.3 lib/rhoconnect/controller/read_state_controller.rb
rhoconnect-5.5.0 lib/rhoconnect/controller/read_state_controller.rb
rhoconnect-5.1.1 lib/rhoconnect/controller/read_state_controller.rb
rhoconnect-4.0.4 lib/rhoconnect/controller/read_state_controller.rb
rhoconnect-4.0.3 lib/rhoconnect/controller/read_state_controller.rb
rhoconnect-4.0.2 lib/rhoconnect/controller/read_state_controller.rb
rhoconnect-4.0.1 lib/rhoconnect/controller/read_state_controller.rb
rhoconnect-4.0.0 lib/rhoconnect/controller/read_state_controller.rb