Class: Forem::Services::PageService
- Inherits:
-
BaseService
- Object
- BaseService
- Forem::Services::PageService
- Defined in:
- lib/forem/services/page_service.rb
Overview
Service for interacting with the Forem Pages API.
Pages are static landing pages within a Forem community. Access via Client#pages. All methods inject the client's requestor automatically so no additional configuration is required.
Instance Method Summary collapse
-
#create(params = {}, opts = {}) ⇒ Page
Create a new static page.
-
#delete(id, opts = {}) ⇒ nil
Delete a static page.
-
#list(params = {}, opts = {}) ⇒ Array<Page>
List all static pages.
-
#retrieve(id, opts = {}) ⇒ Page
Retrieve a single static page by its numeric ID.
-
#update(id, params = {}, opts = {}) ⇒ Page
Update an existing static page.
Methods inherited from BaseService
Constructor Details
This class inherits a constructor from Forem::Services::BaseService
Instance Method Details
#create(params = {}, opts = {}) ⇒ Page
Create a new static page.
56 57 58 |
# File 'lib/forem/services/page_service.rb', line 56 def create(params = {}, opts = {}) Page.create(params, opts_with_requestor(opts)) end |
#delete(id, opts = {}) ⇒ nil
Delete a static page.
102 103 104 |
# File 'lib/forem/services/page_service.rb', line 102 def delete(id, opts = {}) Page.delete(id, opts_with_requestor(opts)) end |
#list(params = {}, opts = {}) ⇒ Array<Page>
List all static pages.
29 30 31 |
# File 'lib/forem/services/page_service.rb', line 29 def list(params = {}, opts = {}) Page.list(params, opts_with_requestor(opts)) end |