Module: Readmill::Client::Comments
- Included in:
- Readmill::Client
- Defined in:
- lib/readmill/client/comments.rb
Overview
Public: This module will bring all of the methods from the comment section of the API.
Instance Method Summary collapse
-
#comment(id, opts = {}) ⇒ Object
Public: Get a specific comment from readmill.
-
#comments(highlight_id, opts = {}) ⇒ Object
Public: Get all comments from readmill.
Instance Method Details
#comment(id, opts = {}) ⇒ Object
Public: Get a specific comment from readmill.
id - The id of a comment to get from readmill. opts - A Hash of options used to modify the results. All of the values
of this Hash will be forwarded to the API as parameters
(default: {}).
Returns a Hashie::Mash.
28 29 30 |
# File 'lib/readmill/client/comments.rb', line 28 def comment(id, opts={}) get("comments/#{id}", opts) end |
#comments(highlight_id, opts = {}) ⇒ Object
Public: Get all comments from readmill.
highlight_id - An id of a highlight to get comments for. opts - A Hash of options used to modify the results. All of the
values of this Hash will be forwarded to the API as
parameters (default: {}).
Returns an Array.
16 17 18 |
# File 'lib/readmill/client/comments.rb', line 16 def comments(highlight_id, opts={}) get("highlights/#{highlight_id}/comments", opts).items end |