Class: Forem::Services::BillboardService
- Inherits:
-
BaseService
- Object
- BaseService
- Forem::Services::BillboardService
- Defined in:
- lib/forem/services/billboard_service.rb
Overview
Service for interacting with the Forem Billboards API.
Billboards are display ads shown within Forem communities. Access via Client#billboards. All methods inject the client's requestor automatically so no additional configuration is required.
Instance Method Summary collapse
-
#create(params = {}, opts = {}) ⇒ Billboard
Create a new billboard.
-
#list(params = {}, opts = {}) ⇒ Array<Billboard>
List all billboards (display ads).
-
#retrieve(id, opts = {}) ⇒ Billboard
Retrieve a single billboard by its numeric ID.
-
#update(id, params = {}, opts = {}) ⇒ Billboard
Update an existing billboard.
Methods inherited from BaseService
Constructor Details
This class inherits a constructor from Forem::Services::BaseService
Instance Method Details
#create(params = {}, opts = {}) ⇒ Billboard
Create a new billboard.
54 55 56 |
# File 'lib/forem/services/billboard_service.rb', line 54 def create(params = {}, opts = {}) Billboard.create(params, opts_with_requestor(opts)) end |
#list(params = {}, opts = {}) ⇒ Array<Billboard>
List all billboards (display ads).
29 30 31 |
# File 'lib/forem/services/billboard_service.rb', line 29 def list(params = {}, opts = {}) Billboard.list(params, opts_with_requestor(opts)) end |