class

Feed

Inherits Ktistec::Model::Common < Ktistec::Model < Reference < Object

An algorithmic feed.

A feed is a runtime-created sibling collection to the timeline whose membership is decided by a judge rather than by a fixed structural rule. The judge's verdicts are the base facts a generic materialized view queries.

Constants

HORIZON = 30.days

How far back a newly published feed reaches.

Class methods

find?(owner : ActivityPub::Actor, slug : String) : Feed | Nil

Returns the owner's published feed with the given slug, if any.

Source
for(owner : ActivityPub::Actor) : Array(Feed)

Returns the owner's feeds, drafts included, newest first.

Source

Instance methods

_append_to_drafts(model_ : Feed) : Nil
Source
_append_to_verdicts(model_ : Feed::Verdict) : Nil
Source
_association_drafts
Source
_association_original
Source
_association_owner
Source
_association_verdicts
Source
_belongs_to_setter_for_original(original_ : Feed, update_associations = true) : Feed
Source
_belongs_to_setter_for_owner(owner_ : ActivityPub::Actor, update_associations = true) : ActivityPub::Actor
Source
_has_many_setter_for_drafts(drafts_ : Enumerable(Feed), update_associations = true) : Enumerable(Feed)
Source
_has_many_setter_for_verdicts(verdicts_ : Enumerable(Feed::Verdict), update_associations = true) : Enumerable(Feed::Verdict)
Source
backend
Source
backend=(backend : String)
Source
before_destroy

Invalidates the feed's verdicts when the feed is destroyed.

Source
before_save

Generates the feed's slug.

Source
before_update

Invalidates the feed's verdicts when the criteria change.

Source
contents(max_id : Int64 | Nil = nil, min_id : Int64 | Nil = nil, limit : Int32 = 10)

Returns the objects in the feed, most recently arrived first.

Source
copy_of
Source
copy_of=(copy_of : Int64 | Nil)
Source
criteria_changed?

Indicates whether the new criteria differ from the persisted criteria.

Source
description
Source
description=(description : String | Nil)
Source
draft
Source
draft=(draft : Bool)
Source
drafts(include_deleted : Bool = false, include_undone : Bool = false) : Enumerable(Feed)
Source
drafts=(drafts_ : Enumerable(Feed)) : Enumerable(Feed)
Source
examples
Source
examples=(examples : Array(Example))
Source
feed_type

The relationship type of the feed's materialized rows.

A synthetic, per-feed string, namespaced so it can never collide with the Relationship::** class names. Rows carrying it must never pass through Relationship's polymorphic loader.

Source
floor

The arrival time the feed's backfill reaches back to.

nil means "no backfill".

Source
floor=(floor : Time | Nil)

The arrival time the feed's backfill reaches back to.

nil means "no backfill".

Source
name
Source
name=(name : String)
Source
original(include_deleted : Bool = false, include_undone : Bool = false) : Feed
Source
original=(original_ : Feed) : Feed
Source
original?(include_deleted : Bool = false, include_undone : Bool = false) : Feed | Nil
Source
owner(include_deleted : Bool = false, include_undone : Bool = false) : ActivityPub::Actor
Source
owner?(include_deleted : Bool = false, include_undone : Bool = false) : ActivityPub::Actor | Nil
Source
owner_iri
Source
owner_iri=(owner_iri : String | Nil)
Source
params

Backend-owned configuration.

Opaque to everything but the backend named by backend.

Source
params=(params : Hash(String, JSON::Any))

Backend-owned configuration.

Opaque to everything but the backend named by backend.

Source
publish

Publishes a draft feed.

Source
published?

Returns true if the feed is published, false if it's a draft.

Source
slug
Source
slug=(slug : String | Nil)
Source
slug_or_id

The feed's identifier in a path.

Source
stats

Returns the size of the feed and the arrival time of its newest post.

Counts only posts the feed displays using the same objects/actors filters #contents applies.

Source
validate_model

Validates the backend's params.

The messages are complete sentences, so they're keyed to no field.

Source
verdicts(include_deleted : Bool = false, include_undone : Bool = false) : Enumerable(Feed::Verdict)
Source
verdicts=(verdicts_ : Enumerable(Feed::Verdict)) : Enumerable(Feed::Verdict)
Source

Nested types