Class: Forem::Services::ReadingListService

Inherits:
BaseService
  • Object
show all
Defined in:
lib/forem/services/reading_list_service.rb

Overview

Service for interacting with the Forem Reading List API.

Lists articles the authenticated user has bookmarked for later reading. Access via Client#reading_list. All methods inject the client's requestor automatically so no additional configuration is required.

Examples:

client = Forem::Client.new("your-api-key")
bookmarks = client.reading_list.list(page: 1, per_page: 20)

See Also:

Instance Method Summary collapse

Methods inherited from BaseService

#initialize

Constructor Details

This class inherits a constructor from Forem::Services::BaseService

Instance Method Details

#list(params = {}, opts = {}) ⇒ Array<ReadingList>

List articles in the authenticated user's reading list.

Examples:

client.reading_list.list(per_page: 50)

Parameters:

  • params (Hash) (defaults to: {})

    query parameters

  • opts (Hash) (defaults to: {})

    per-request options

Options Hash (params):

  • :page (Integer)

    page number (default: 1)

  • :per_page (Integer)

    number of results per page (max: 1000)

  • :status (String)

    filter by bookmark status ("valid", "invalid", "confirmed", "archived")

Returns:

  • (Array<ReadingList>)

    bookmarked articles for the current user

See Also:



30
31
32
# File 'lib/forem/services/reading_list_service.rb', line 30

def list(params = {}, opts = {})
  ReadingList.list(params, opts_with_requestor(opts))
end