Class: Forem::RecommendedArticlesList

Inherits:
APIResource show all
Extended by:
APIOperations::Create, APIOperations::List, APIOperations::Retrieve, APIOperations::Update
Includes:
APIOperations::Save
Defined in:
lib/forem/resources/recommended_articles_list.rb

Overview

Represents a curated list of recommended articles on a Forem instance.

Curated lists of recommended articles. Used by admins to manage content recommendations.

RecommendedArticlesLists are editorial curation objects that group articles for display in recommendation widgets or featured sections. Full CRUD operations are supported. Managing these lists typically requires an admin API key.

Available operations (via mixins):

- +List+     — GET /api/recommended_articles_lists
- +Create+   — POST /api/recommended_articles_lists
- +Retrieve+ — GET /api/recommended_articles_lists/:id
- +Update+   — PUT /api/recommended_articles_lists/:id
- +Save+     — instance-level save (create or update)

Examples:

List all recommended article lists

lists = client.recommended_articles_lists.list
lists.each { |l| puts l.name }

Create a recommended articles list (flat params)

list = client.recommended_articles_lists.create(
  name: "Top Ruby Articles",
  article_ids: [101, 202, 303]
)

Retrieve a list by ID and update it

list = client.recommended_articles_lists.retrieve(1)
list.name = "Updated Name"
list.save

See Also:

Constant Summary collapse

OBJECT_NAME =
"recommended_articles_list"
RESOURCE_PATH =
"/api/recommended_articles_lists"

Instance Attribute Summary

Attributes inherited from ForemObject

#requestor

Method Summary

Methods included from APIOperations::Create

create

Methods included from APIOperations::List

list

Methods included from APIOperations::Retrieve

retrieve

Methods included from APIOperations::Update

update

Methods included from APIOperations::Save

#save

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

included, #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