class ActivityPub::Collection

Included Modules

Extended Modules

Direct Known Subclasses

Defined in:

models/activity_pub/collection.cr
models/activity_pub/collection/collection_page.cr
models/activity_pub/collection/ordered_collection.cr
models/activity_pub/collection/ordered_collection_page.cr

Class Method Summary

Instance Method Summary

Class methods inherited from module ActivityPub

from_json_ld(json, **options) from_json_ld, from_json_ld?(json, **options) from_json_ld?

Instance methods inherited from module Ktistec::Model::Linked

cached? cached?, local? local?, origin origin, to_s(io : IO) to_s, uid uid

Instance methods inherited from module Ktistec::Model::Common

created_at : Time created_at, created_at=(created_at : Time) created_at=, updated_at : Time updated_at, updated_at=(updated_at : Time) updated_at=

Instance methods inherited from module Ktistec::Model::InstanceMethods

==(other) ==, _run_validations _run_validations, _save_model(skip_validation = false) _save_model, _serialize_graph(nodes, association = nil, index = nil, skip_associated = false) _serialize_graph, assign(properties : Hash(String, Any), *, _strict : Bool = false) forall Any
assign(*, _strict : Bool = false, **properties)
assign
, changed!(*properties : Symbol) changed!, changed?
changed?(*properties : Symbol)
changed?
, clear!
clear!(*properties : Symbol)
clear!
, destroy destroy, destroyed? destroyed?, errors errors, hash(hasher) hash, inspect(io : IO) inspect, new_record? new_record?, reload! reload!, save(skip_validation = false, skip_associated = false) save, serialize_graph(skip_associated = false) serialize_graph, table_name table_name, to_h to_h, to_json(json : JSON::Builder) to_json, to_s(io : IO) to_s, update_property(property, value) update_property, valid?(skip_associated = false) valid?, validate(skip_associated = false) validate

Constructor methods inherited from module Ktistec::Model::InstanceMethods

new(properties : Hash(String, Any), *, _strict : Bool = false) forall Any
new(*, _strict : Bool = false, **properties)
new

Macros inherited from module Ktistec::Model::InstanceMethods

belongs_to(name, primary_key = id, foreign_key = nil, class_name = nil, inverse_of = nil) belongs_to, derived(decl, *, aliased_to) derived, has_many(name, primary_key = id, foreign_key = nil, class_name = nil, inverse_of = nil) has_many, has_one(name, primary_key = id, foreign_key = nil, class_name = nil, inverse_of = nil) has_one, validates(property, &block) validates

Instance methods inherited from module Ktistec::Model

id : Int64 | Nil id, id=(id : Int64 | Nil) id=

Class Method Detail

def self.dereference?(key_pair, iri, *, ignore_cached = false, include_deleted = false, **options) : self | Nil #

[View source]
def self.find(_iri iri : String | Nil, include_deleted : Bool = false, include_undone : Bool = false) #

[View source]
def self.find?(_iri iri : String | Nil, include_deleted : Bool = false, include_undone : Bool = false) #

[View source]
def self.from_json_ld(json, **options) #

[View source]
def self.from_json_ld?(json, **options) #

[View source]
def self.map(json : JSON::Any | String | IO, **options) #

[View source]

Instance Method Detail

def _association_current #

[View source]
def _association_first #

[View source]
def _association_last #

[View source]
def _association_next #

[View source]
def _association_prev #

[View source]
def _belongs_to_setter_for_current(current_ : ActivityPub::Collection, update_associations = true) : ActivityPub::Collection #

[View source]
def _belongs_to_setter_for_first(first_ : ActivityPub::Collection, update_associations = true) : ActivityPub::Collection #

[View source]
def _belongs_to_setter_for_last(last_ : ActivityPub::Collection, update_associations = true) : ActivityPub::Collection #

[View source]
def _belongs_to_setter_for_next(next_ : ActivityPub::Collection, update_associations = true) : ActivityPub::Collection #

[View source]
def _belongs_to_setter_for_prev(prev_ : ActivityPub::Collection, update_associations = true) : ActivityPub::Collection #

[View source]
def all_item_iris(source, maximum_depth = 10) #

Traverses the collection and returns IRIs of all items.

Returns nil if #items_iris, #first_iri and #last_iri are all nil. This is how ActivityPub hashtag collections on Mastodon are represented -- the items are retrieved via the Mastodon API.


[View source]
def current(include_deleted : Bool = false, include_undone : Bool = false) : ActivityPub::Collection #

[View source]

[View source]
def current?(include_deleted : Bool = false, include_undone : Bool = false) : ActivityPub::Collection | Nil #

[View source]
def current?(key_pair, *, dereference = false, ignore_cached = false, ignore_changed = false, **options) #

def current_iri : String | Nil #

[View source]
def current_iri=(current_iri : String | Nil) #

[View source]
def first(include_deleted : Bool = false, include_undone : Bool = false) : ActivityPub::Collection #

[View source]

[View source]
def first?(include_deleted : Bool = false, include_undone : Bool = false) : ActivityPub::Collection | Nil #

[View source]
def first?(key_pair, *, dereference = false, ignore_cached = false, ignore_changed = false, **options) #

def first_iri : String | Nil #

[View source]
def first_iri=(first_iri : String | Nil) #

[View source]
def from_json_ld(json) #

[View source]
def iri : String #

def iri=(iri : String) #

def items : Array(ActivityPub | String) | Nil #

[View source]
def items=(items : Array(ActivityPub | String) | Nil) #

[View source]
def items_iris : Array(String) | Nil #

[View source]
def items_iris=(items_iris : Array(String) | Nil) #

[View source]
def last(include_deleted : Bool = false, include_undone : Bool = false) : ActivityPub::Collection #

[View source]

[View source]
def last?(include_deleted : Bool = false, include_undone : Bool = false) : ActivityPub::Collection | Nil #

[View source]
def last?(key_pair, *, dereference = false, ignore_cached = false, ignore_changed = false, **options) #

def last_iri : String | Nil #

[View source]
def last_iri=(last_iri : String | Nil) #

[View source]
def next(include_deleted : Bool = false, include_undone : Bool = false) : ActivityPub::Collection #

[View source]

[View source]
def next?(include_deleted : Bool = false, include_undone : Bool = false) : ActivityPub::Collection | Nil #

[View source]
def next?(key_pair, *, dereference = false, ignore_cached = false, ignore_changed = false, **options) #

def next_iri : String | Nil #

[View source]
def next_iri=(next_iri : String | Nil) #

[View source]
def prev(include_deleted : Bool = false, include_undone : Bool = false) : ActivityPub::Collection #

[View source]

[View source]
def prev?(include_deleted : Bool = false, include_undone : Bool = false) : ActivityPub::Collection | Nil #

[View source]
def prev?(key_pair, *, dereference = false, ignore_cached = false, ignore_changed = false, **options) #

def prev_iri : String | Nil #

[View source]
def prev_iri=(prev_iri : String | Nil) #

[View source]
def to_json_ld(recursive = true) #

[View source]
def total_items : Int64 | Nil #

[View source]
def total_items=(total_items : Int64 | Nil) #

[View source]