lib/gaspm/google_drive_helper.rb
def retrieve_script_files
      result = Array.new
      page_token = nil
      begin
        parameters = {}
        parameters['q'] = 'mimeType=\'application/vnd.google-apps.script\''
        if page_token.to_s != ''
          parameters['pageToken'] = page_token
        end
        api_result = google_client.execute(
            :api_method => google_drive.files.list,
            :parameters => parameters
        )
        if api_result.status == 200
          files = api_result.data
          result.concat(files.items)
          page_token = files.next_page_token
        else
          puts 'An error occurred: ' + api_result.data['error']['message']
          page_token = nil
        end
      end while page_token.to_s != ''
      result
    end
##
# Retrieve a list of all GAS files.
#
# @return [Array]
#   List of File resources.
#
Retrieve a list of all GAS files.
Retrieve a list of all GAS files .
def retrieve_script_files
      result = Array.new
      page_token = nil
      begin
        parameters = {}
        parameters['q'] = 'mimeType=\'application/vnd.google-apps.script\''
        if page_token.to_s != ''
          parameters['pageToken'] = page_token
        end
        api_result = google_client.execute(
            :api_method => google_drive.files.list,
            :parameters => parameters
        )
        if api_result.status == 200
          files = api_result.data
          result.concat(files.items)
          page_token = files.next_page_token
        else
          puts 'An error occurred: ' + api_result.data['error']['message']
          page_token = nil
        end
      end while page_token.to_s != ''
      result
    end
def retrieve_script_files result = Array . new page_token = nil begin parameters = { } parameters [ 'q' ] = 'mimeType=\'application/vnd.google-apps.script\'' if page_token . to_s != '' parameters [ 'pageToken' ] = page_token end api_result = google_client . execute ( :api_method => google_drive . files . list , :parameters => parameters ) if api_result . status == 200 files = api_result . data result . concat ( files . items ) page_token = files . next_page_token else puts 'An error occurred: ' + api_result . data [ 'error' ] [ 'message' ] page_token = nil end end while page_token . to_s != '' result end
Retrieve a list of all GAS files.
Retrieve a list of all GAS files .
List of File resources.
List of File resources .
Array