Class: Serel::Question
- Inherits:
-
Base
- Object
- Base
- Serel::Question
show all
- Defined in:
- lib/serel/question.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
#[], #[]=, #all, associations, attribute, config, #find, finder_methods, #get, #initialize, #inspect, #meth, method_missing, #network, network_wide, new_relation, request, respond_to?, #type, with_ids
Constructor Details
This class inherits a constructor from Serel::Base
Class Method Details
.featured ⇒ Object
34
35
36
|
# File 'lib/serel/question.rb', line 34
def self.featured
url("questions/featured")
end
|
.no_answers ⇒ Object
50
51
52
|
# File 'lib/serel/question.rb', line 50
def self.no_answers
url("questions/no-answers")
end
|
.search ⇒ Object
38
39
40
|
# File 'lib/serel/question.rb', line 38
def self.search
url("search")
end
|
.similar ⇒ Object
42
43
44
|
# File 'lib/serel/question.rb', line 42
def self.similar
url("similar")
end
|
.unanswered ⇒ Object
46
47
48
|
# File 'lib/serel/question.rb', line 46
def self.unanswered
url("questions/unanswered")
end
|
Instance Method Details
#answers ⇒ Object
54
55
56
|
# File 'lib/serel/question.rb', line 54
def answers
type(:answer).url("questions/#{id}/answers")
end
|
58
59
60
|
# File 'lib/serel/question.rb', line 58
def
type(:comment).url("questions/#{id}/comments")
end
|
#linked ⇒ Object
62
63
64
|
# File 'lib/serel/question.rb', line 62
def linked
type(:question).url("questions/#{id}/linked")
end
|
66
67
68
|
# File 'lib/serel/question.rb', line 66
def related
type(:question).url("questions/#{id}/related")
end
|
Get the revisions on a question.
72
73
74
|
# File 'lib/serel/question.rb', line 72
def revisions
type(:revision).url("posts/#{id}/revisions")
end
|
Get the suggested edits on a question
78
79
80
|
# File 'lib/serel/question.rb', line 78
def suggested_edits
type(:suggested_edit).url("posts/#{id}/suggested-edits")
end
|
#timeline ⇒ Object
82
83
84
|
# File 'lib/serel/question.rb', line 82
def timeline
type(:timeline).url("questions/#{id}/timeline")
end
|