Class: Twitter::SearchResultInfo

Inherits:
Hash
  • Object
show all
Defined in:
lib/twitter/search_result_info.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new_from_hash(hash) ⇒ Object

Creates an easier to work with hash from one with string-based keys



6
7
8
9
10
11
12
13
14
15
# File 'lib/twitter/search_result_info.rb', line 6

def self.new_from_hash(hash)
  i = new
  i.merge!(hash)
  search_results = []
  i.results.each do |r|
    search_results << SearchResult.new_from_hash(r)
  end
  i.results = search_results
  i
end

Instance Method Details

#completed_inObject



17
18
19
# File 'lib/twitter/search_result_info.rb', line 17

def completed_in
  self['completed_in']
end

#completed_in=(val) ⇒ Object



21
22
23
# File 'lib/twitter/search_result_info.rb', line 21

def completed_in=(val)
  self['completed_in'] = val
end

#max_idObject



25
26
27
# File 'lib/twitter/search_result_info.rb', line 25

def max_id
  self['max_id']
end

#max_id=(val) ⇒ Object



29
30
31
# File 'lib/twitter/search_result_info.rb', line 29

def max_id=(val)
  self['max_id'] = val
end

#next_pageObject



33
34
35
# File 'lib/twitter/search_result_info.rb', line 33

def next_page
  self['next_page']
end

#next_page=(val) ⇒ Object



37
38
39
# File 'lib/twitter/search_result_info.rb', line 37

def next_page=(val)
  self['next_page'] = val
end

#pageObject



41
42
43
# File 'lib/twitter/search_result_info.rb', line 41

def page
  self['page']
end

#page=(val) ⇒ Object



45
46
47
# File 'lib/twitter/search_result_info.rb', line 45

def page=(val)
  self['page'] = val
end

#refresh_urlObject



49
50
51
# File 'lib/twitter/search_result_info.rb', line 49

def refresh_url
  self['refresh_url']
end

#refresh_url=(val) ⇒ Object



53
54
55
# File 'lib/twitter/search_result_info.rb', line 53

def refresh_url=(val)
  self['refresh_url'] = val
end

#resultsObject



73
74
75
# File 'lib/twitter/search_result_info.rb', line 73

def results
  self['results']
end

#results=(val) ⇒ Object



77
78
79
# File 'lib/twitter/search_result_info.rb', line 77

def results=(val)
  self['results'] = val
end

#results_per_pageObject



57
58
59
# File 'lib/twitter/search_result_info.rb', line 57

def results_per_page
  self['results_per_page']
end

#results_per_page=(val) ⇒ Object



61
62
63
# File 'lib/twitter/search_result_info.rb', line 61

def results_per_page=(val)
  self['results_per_page'] = val
end

#since_idObject



65
66
67
# File 'lib/twitter/search_result_info.rb', line 65

def since_id
  self['since_id']
end

#since_id=(val) ⇒ Object



69
70
71
# File 'lib/twitter/search_result_info.rb', line 69

def since_id=(val)
  self['since_id'] = val
end