Class: Forem::Comment
- Inherits:
-
APIResource
- Object
- ForemObject
- APIResource
- Forem::Comment
- Extended by:
- APIOperations::List, APIOperations::Retrieve
- Defined in:
- lib/forem/resources/comment.rb
Overview
Represents a comment on a Forem article or podcast episode.
Comments are threaded replies attached to articles or podcast episodes. They can be listed (optionally filtered by the parent content item) or retrieved individually by ID.
Available operations (via mixins):
- +List+ — GET /api/comments (pass +:a_id+ or +:p_id+ to filter)
- +Retrieve+ — GET /api/comments/:id (returns comment tree rooted at that ID)
List Parameters
Comments must be filtered by either article or podcast episode:
a_id(String) — Article identifier (required ifp_idnot provided)p_id(String) — Podcast Episode identifier (required ifa_idnot provided)page(Integer) — Page numberper_page(Integer) — Items per page (default: 50)
Returns threaded conversations with nested replies.
Constant Summary collapse
- OBJECT_NAME =
"comment"- RESOURCE_PATH =
"/api/comments"
Instance Attribute Summary
Attributes inherited from ForemObject
Method Summary
Methods included from APIOperations::List
Methods included from APIOperations::Retrieve
Methods inherited from APIResource
#refresh, resource_path, #resource_url
Methods inherited from ForemObject
#==, #[], #[]=, construct_from, cursor_list, #initialize, #inspect, #method_missing, paginated_list, #respond_to_missing?, #to_hash
Methods included from APIOperations::Request
Constructor Details
This class inherits a constructor from Forem::ForemObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Forem::ForemObject