Class: Twitter::SearchResults
- Inherits:
-
Base
- Object
- Base
- Twitter::SearchResults
show all
- Defined in:
- lib/twitter/search_results.rb
Instance Method Summary
collapse
Methods inherited from Base
#[], #attr_equal, attr_reader, #attrs, #attrs_equal, fetch, fetch_or_new, from_response, identity_map, #initialize, store, #update
Constructor Details
This class inherits a constructor from Twitter::Base
Instance Method Details
#completed_in ⇒ Float
16
17
18
|
# File 'lib/twitter/search_results.rb', line 16
def completed_in
@attrs[:search_metadata][:completed_in] if search_metadata?
end
|
#max_id ⇒ Integer
21
22
23
|
# File 'lib/twitter/search_results.rb', line 21
def max_id
@attrs[:search_metadata][:max_id] if search_metadata?
end
|
#page ⇒ Integer
26
27
28
|
# File 'lib/twitter/search_results.rb', line 26
def page
@attrs[:search_metadata][:page] if search_metadata?
end
|
#query ⇒ String
31
32
33
|
# File 'lib/twitter/search_results.rb', line 31
def query
@attrs[:search_metadata][:query] if search_metadata?
end
|
#results_per_page ⇒ Integer
Also known as:
rpp
36
37
38
|
# File 'lib/twitter/search_results.rb', line 36
def results_per_page
@attrs[:search_metadata][:results_per_page] if search_metadata?
end
|
41
42
43
|
# File 'lib/twitter/search_results.rb', line 41
def search_metadata?
!@attrs[:search_metadata].nil?
end
|
#since_id ⇒ Integer
46
47
48
|
# File 'lib/twitter/search_results.rb', line 46
def since_id
@attrs[:search_metadata][:since_id] if search_metadata?
end
|
#statuses ⇒ Array<Twitter::Tweet>
Also known as:
collection, results
7
8
9
10
11
|
# File 'lib/twitter/search_results.rb', line 7
def statuses
@results ||= Array(@attrs[:statuses]).map do ||
::.fetch_or_new()
end
end
|