I'm developing using Ruby Sinatra and currently using:
gem 'google_drive'
gem 'google-api-client' , '~> 0.9'
@service = Google::Apis::DriveV3::DriveService.new
@service.client_options.application_name = APPLICATION_NAME
@service.authorization = authorize
get_images = @service.list_files(q: "'xxxx' in parents and trashed = false",
order_by: 'createdTime desc',
spaces: 'drive',
fields:'nextPageToken, files(id, name)',
page_size: 10)
get_images.files.each do |file|
......
end
I want to display the images randomly, but
How can I get random image in a folder which contains many images ?