Class: Forem::Page
- Inherits:
-
APIResource
- Object
- ForemObject
- APIResource
- Forem::Page
- Extended by:
- APIOperations::Create, APIOperations::List, APIOperations::Retrieve, APIOperations::Update
- Includes:
- APIOperations::Delete, APIOperations::Save
- Defined in:
- lib/forem/resources/page.rb
Overview
Represents a custom static page on a Forem instance.
Pages are CMS-style content pages on a Forem instance (e.g., about pages, code of conduct).
Pages are standalone content items (not articles) used for things like an "About" page, a "Code of Conduct", or any other informational page that lives at a dedicated URL on the community site. Full CRUD operations are available, but managing pages requires an admin API key.
Available operations (via mixins):
- +List+ — GET /api/pages
- +Create+ — POST /api/pages
- +Retrieve+ — GET /api/pages/:id
- +Update+ — PUT /api/pages/:id
- +Delete+ — instance-level delete (DELETE /api/pages/:id)
- +Save+ — instance-level save (create or update)
Constant Summary collapse
- OBJECT_NAME =
"page"- RESOURCE_PATH =
"/api/pages"
Instance Attribute Summary
Attributes inherited from ForemObject
Method Summary
Methods included from APIOperations::Create
Methods included from APIOperations::List
Methods included from APIOperations::Retrieve
Methods included from APIOperations::Update
Methods included from APIOperations::Save
Methods included from APIOperations::Delete
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