Sha256: 20195bb76df1267918aa3eeb6afdae181f346e928eb03a0982f5348f5cb99a72

Contents?: true

Size: 1.43 KB

Versions: 6

Compression:

Stored size: 1.43 KB

Contents

module DropboxApi::Endpoints::Files
  class ListFolder < DropboxApi::Endpoints::Rpc
    Method      = :post
    Path        = "/2/files/list_folder".freeze
    ResultType  = DropboxApi::Results::ListFolderResult
    ErrorType   = DropboxApi::Errors::ListFolderError

    include DropboxApi::Endpoints::OptionsValidator

    # Returns the contents of a folder.
    #
    # @param path [String] The path to the folder you want to read.
    # @option recursive [Boolean] If `true`, the list folder operation will be
    #   applied recursively to all subfolders and the response will contain
    #   contents of all subfolders. The default for this field is `false`.
    # @option include_media_info [Boolean] If `true`, FileMetadata.media_info
    #   is set for photo and video. The default for this field is `false`.
    # @option include_deleted [Boolean] If `true`, DeletedMetadata will be
    #   returned for deleted file or folder, otherwise LookupError.not_found
    #   will be returned. The default for this field is `false`.
    add_endpoint :list_folder do |path, options = {}|
      validate_options([
        :recursive,
        :include_media_info,
        :include_deleted,
        :include_has_explicit_shared_members
      ], options)
      options[:recursive] ||= false
      options[:include_media_info] ||= false
      options[:include_deleted] ||= false

      perform_request options.merge({
        :path => path
      })
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
dropbox_api-0.1.10 lib/dropbox_api/endpoints/files/list_folder.rb
dropbox_api-0.1.9 lib/dropbox_api/endpoints/files/list_folder.rb
dropbox_api-0.1.8 lib/dropbox_api/endpoints/files/list_folder.rb
dropbox_api-0.1.7 lib/dropbox_api/endpoints/files/list_folder.rb
dropbox_api-0.1.6 lib/dropbox_api/endpoints/files/list_folder.rb
dropbox_api-0.1.5 lib/dropbox_api/endpoints/files/list_folder.rb