Class: Ahub::Answer
- Inherits:
-
Object
- Object
- Ahub::Answer
- Includes:
- APIResource, Deletable
- Defined in:
- lib/ahub/answer.rb
Instance Attribute Summary
Attributes included from APIResource
Class Method Summary collapse
Instance Method Summary collapse
- #html_url ⇒ Object
-
#initialize(attrs) ⇒ Answer
constructor
A new instance of Answer.
- #user ⇒ Object
Methods included from Deletable
Methods included from APIResource
Constructor Details
Class Method Details
.create(question_id:, body:, username:, password:) ⇒ Object
6 7 8 9 10 |
# File 'lib/ahub/answer.rb', line 6 def self.create(question_id:, body:, username:, password:) url = "#{Ahub::DOMAIN}/services/v2/question/#{question_id}/answer.json" create_resource(url: url, payload: {body: body}, headers: headers(username: username, password: password)) end |