Class: ImagesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/images_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



4
5
# File 'app/controllers/images_controller.rb', line 4

def index
end

#listObject



15
16
17
18
19
20
21
22
# File 'app/controllers/images_controller.rb', line 15

def list
  data = {
    :start => params[:start].to_i - 1,
    :limit => params[:limit]
  }
  image = DcmgrResource::Image.list(data)
  respond_with(image[0],:to => [:json])
end

#showObject

images/show/1.json



8
9
10
11
12
# File 'app/controllers/images_controller.rb', line 8

def show
  image_id = params[:id]
  detail = DcmgrResource::Image.show(image_id)
  respond_with(detail,:to => [:json])
end

#totalObject



24
25
26
27
# File 'app/controllers/images_controller.rb', line 24

def total
 total_resource = DcmgrResource::Image.total_resource
 render :json => total_resource
end