Class: DropboxApi::Results::SearchV2Result

Inherits:
Base
  • Object
show all
Defined in:
lib/dropbox_api/results/search_v2_result.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from DropboxApi::Results::Base

Instance Method Details

#cursorObject

Pass the cursor into #search_continue to fetch the next page of results. This field is optional.



19
20
21
# File 'lib/dropbox_api/results/search_v2_result.rb', line 19

def cursor
  @data['cursor']
end

#has_more?Boolean

Used for paging. If true, indicates there is another page of results available that can be fetched by calling search again.

Returns:

  • (Boolean)


13
14
15
# File 'lib/dropbox_api/results/search_v2_result.rb', line 13

def has_more?
  @data['has_more'].to_s == 'true'
end

#matchesObject

A list (possibly empty) of matches for the query.



5
6
7
8
9
# File 'lib/dropbox_api/results/search_v2_result.rb', line 5

def matches
  @matches ||= @data['matches'].map do |match|
    DropboxApi::Metadata::SearchMatchV2.new match
  end
end