Class: Forem::Services::RecommendedArticlesListService
- Inherits:
-
BaseService
- Object
- BaseService
- Forem::Services::RecommendedArticlesListService
- Defined in:
- lib/forem/services/recommended_articles_list_service.rb
Overview
Service for interacting with the Forem Recommended Articles Lists API.
Recommended articles lists are curated collections of articles surfaced to specific user segments. Access via Client#recommended_articles_lists. All methods inject the client's requestor automatically so no additional configuration is required.
Instance Method Summary collapse
-
#create(params = {}, opts = {}) ⇒ RecommendedArticlesList
Create a new recommended articles list.
-
#list(params = {}, opts = {}) ⇒ Array<RecommendedArticlesList>
List all recommended articles lists.
-
#retrieve(id, opts = {}) ⇒ RecommendedArticlesList
Retrieve a single recommended articles list by its numeric ID.
-
#update(id, params = {}, opts = {}) ⇒ RecommendedArticlesList
Update an existing recommended articles list.
Methods inherited from BaseService
Constructor Details
This class inherits a constructor from Forem::Services::BaseService
Instance Method Details
#create(params = {}, opts = {}) ⇒ RecommendedArticlesList
Create a new recommended articles list.
51 52 53 |
# File 'lib/forem/services/recommended_articles_list_service.rb', line 51 def create(params = {}, opts = {}) RecommendedArticlesList.create(params, opts_with_requestor(opts)) end |
#list(params = {}, opts = {}) ⇒ Array<RecommendedArticlesList>
List all recommended articles lists.
31 32 33 |
# File 'lib/forem/services/recommended_articles_list_service.rb', line 31 def list(params = {}, opts = {}) RecommendedArticlesList.list(params, opts_with_requestor(opts)) end |
#retrieve(id, opts = {}) ⇒ RecommendedArticlesList
Retrieve a single recommended articles list by its numeric ID.
65 66 67 |
# File 'lib/forem/services/recommended_articles_list_service.rb', line 65 def retrieve(id, opts = {}) RecommendedArticlesList.retrieve(id, opts_with_requestor(opts)) end |
#update(id, params = {}, opts = {}) ⇒ RecommendedArticlesList
Update an existing recommended articles list.
82 83 84 |
# File 'lib/forem/services/recommended_articles_list_service.rb', line 82 def update(id, params = {}, opts = {}) RecommendedArticlesList.update(id, params, opts_with_requestor(opts)) end |