Class: DropboxApi::Results::SearchResult

Inherits:
Base
  • Object
show all
Defined in:
lib/dropbox_api/results/search_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

#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)


18
19
20
# File 'lib/dropbox_api/results/search_result.rb', line 18

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

#matchesObject

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



4
5
6
7
8
# File 'lib/dropbox_api/results/search_result.rb', line 4

def matches
  @matches ||= @data["matches"].map do |match|
    DropboxApi::Results::Search::Match.new match
  end
end

#startObject

Used for paging. Value to set the start argument to when calling search to fetch the next page of results.



12
13
14
# File 'lib/dropbox_api/results/search_result.rb', line 12

def start
  @data["start"].to_i
end