Parent

Class/Module Index [+]

Quicksearch

Twitter::SearchResults

Public Instance Methods

collection() click to toggle source
Alias for: statuses
completed_in() click to toggle source

@return [Float]

# File lib/twitter/search_results.rb, line 16
def completed_in
  @attrs[:search_metadata][:completed_in] if search_metadata?
end
max_id() click to toggle source

@return [Integer]

# File lib/twitter/search_results.rb, line 21
def max_id
  @attrs[:search_metadata][:max_id] if search_metadata?
end
next_page() click to toggle source
Alias for: next_results
next_page?() click to toggle source
Alias for: next_results?
next_results() click to toggle source

Returns a Hash of query parameters for the next result in the search

@note Returned Hash can be merged into the previous search options list to easily access the next page. @return [Hash] The parameters needed to fetch the next page.

# File lib/twitter/search_results.rb, line 60
def next_results
  if next_results?
    query_string = strip_first_character(@attrs[:search_metadata][:next_results])
    query_string_to_hash(query_string)
  end
end
Also aliased as: next_page
next_results?() click to toggle source

@return [Boolean]

# File lib/twitter/search_results.rb, line 51
def next_results?
  !@attrs[:search_metadata][:next_results].nil? if search_metadata?
end
Also aliased as: next_page?
page() click to toggle source

@return [Integer]

# File lib/twitter/search_results.rb, line 26
def page
  @attrs[:search_metadata][:page] if search_metadata?
end
query() click to toggle source

@return [String]

# File lib/twitter/search_results.rb, line 31
def query
  @attrs[:search_metadata][:query] if search_metadata?
end
refresh_page() click to toggle source
Alias for: refresh_url
refresh_url() click to toggle source

Returns a Hash of query parameters for the refresh URL in the search

@note Returned Hash can be merged into the previous search options list to easily access the refresh page. @return [Hash] The parameters needed to refresh the page.

# File lib/twitter/search_results.rb, line 72
def refresh_url
  query_string = strip_first_character(@attrs[:search_metadata][:refresh_url])
  query_string_to_hash(query_string)
end
Also aliased as: refresh_page
results() click to toggle source
Alias for: statuses
results_per_page() click to toggle source

@return [Integer]

# File lib/twitter/search_results.rb, line 36
def results_per_page
  @attrs[:search_metadata][:results_per_page] if search_metadata?
end
Also aliased as: rpp
rpp() click to toggle source
Alias for: results_per_page
search_metadata?() click to toggle source
# File lib/twitter/search_results.rb, line 41
def search_metadata?
  !@attrs[:search_metadata].nil?
end
since_id() click to toggle source

@return [Integer]

# File lib/twitter/search_results.rb, line 46
def since_id
  @attrs[:search_metadata][:since_id] if search_metadata?
end
statuses() click to toggle source

@return [Array<Twitter::Tweet>]

# File lib/twitter/search_results.rb, line 7
def statuses
  @results ||= Array(@attrs[:statuses]).map do |tweet|
    Twitter::Tweet.fetch_or_new(tweet)
  end
end
Also aliased as: collection, results

[Validate]

Generated with the Darkfish Rdoc Generator 2.