Sha256: 3d51ff5d9c021ba84aff00da348d230207f05f155108e4e6792eecdc8f8c1289

Contents?: true

Size: 668 Bytes

Versions: 7

Compression:

Stored size: 668 Bytes

Contents

get '/sample2' do
  haml :sample2
end

post '/sample2' do
  set :client_id, params[:client_id]
  set :private_key, params[:private_key]

  begin
    raise "Please enter all required parameters" if settings.client_id.empty? or settings.private_key.empty?
    files_list = GroupDocs::Storage::Folder.list!('/', {}, { :client_id => settings.client_id, :private_key => settings.private_key})
    filelist = ''
    files_list.each {|element| filelist += element.name + '<br />'}
  rescue Exception => e
    err = e.message
  end  
  
  haml :sample2, :locals => { :userId => settings.client_id, :privateKey => settings.private_key, :filelist => filelist, :err => err }
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
groupdocs-1.2.8 examples/api-samples/samples/sample2.rb
groupdocs-1.2.7 examples/api-samples/samples/sample2.rb
groupdocs-1.2.6 examples/api-samples/samples/sample2.rb
groupdocs-1.2.3 examples/api-samples/samples/sample2.rb
groupdocs-1.2.2 examples/api-samples/samples/sample2.rb
groupdocs-1.2.1 examples/api-samples/samples/sample2.rb
groupdocs-1.2.0 examples/api-samples/samples/sample2.rb