class ActivityPub::Object
- ActivityPub::Object
- Reference
- Object
Included Modules
- ActivityPub
- Ktistec::Model
- Ktistec::Model::Blockable
- Ktistec::Model::Common
- Ktistec::Model::Deletable
- Ktistec::Model::InstanceMethods
- Ktistec::Model::Linked
- Ktistec::Model::Polymorphic
- Ktistec::Model::Renderable
- Ktistec::Model::Serialized
- School::DomainType
Extended Modules
Direct Known Subclasses
- ActivityPub::Object::Article
- ActivityPub::Object::Audio
- ActivityPub::Object::Event
- ActivityPub::Object::Image
- ActivityPub::Object::Note
- ActivityPub::Object::Page
- ActivityPub::Object::Place
- ActivityPub::Object::Question
- ActivityPub::Object::Tombstone
- ActivityPub::Object::Video
Defined in:
controllers/streaming.crmodels/activity_pub/object.cr
models/activity_pub/object/article.cr
models/activity_pub/object/audio.cr
models/activity_pub/object/event.cr
models/activity_pub/object/image.cr
models/activity_pub/object/note.cr
models/activity_pub/object/page.cr
models/activity_pub/object/place.cr
models/activity_pub/object/question.cr
models/activity_pub/object/tombstone.cr
models/activity_pub/object/video.cr
models/relationship/content/follow/thread.cr
models/task/fetch/thread.cr
rules/content_rules.cr
Class Method Summary
- .dereference?(key_pair, iri, *, ignore_cached = false, include_deleted = false, **options) : self | Nil
-
.federated_posts(page = 1, size = 10)
Returns federated posts.
-
.federated_posts_count
Returns the count of federated posts.
- .find(_iri iri : String | Nil, include_deleted : Bool = false, include_undone : Bool = false)
- .find?(_iri iri : String | Nil, include_deleted : Bool = false, include_undone : Bool = false)
- .from_json_ld(json, **options)
- .from_json_ld?(json, **options)
- .map(json : JSON::Any | String | IO, **options)
-
.public_posts(page = 1, size = 10)
Returns the site's public posts.
-
.public_posts_count
Returns the count of the site's public posts.
Instance Method Summary
- #_association_attributed_to
- #_association_hashtags
- #_association_in_reply_to
- #_association_mentions
- #_belongs_to_setter_for_attributed_to(attributed_to_ : ActivityPub::Actor, update_associations = true) : ActivityPub::Actor
- #_belongs_to_setter_for_in_reply_to(in_reply_to_ : ActivityPub::Object, update_associations = true) : ActivityPub::Object
- #_has_many_setter_for_hashtags(hashtags_ : Enumerable(Tag::Hashtag), update_associations = true) : Enumerable(Tag::Hashtag)
- #_has_many_setter_for_mentions(mentions_ : Enumerable(Tag::Mention), update_associations = true) : Enumerable(Tag::Mention)
- #activities(inclusion = nil, exclusion = nil)
- #after_create
- #after_delete
- #after_destroy
- #after_save
- #ancestors(approved_by)
- #ancestors
- #announces_count : Int64
- #announces_count=(announces_count : Int64)
- #approved_by?(approved_by)
- #attachments : Array(Attachment) | Nil
- #attachments=(attachments : Array(Attachment) | Nil)
- #attributed_to(include_deleted : Bool = false, include_undone : Bool = false) : ActivityPub::Actor
- #attributed_to=(attributed_to_ : ActivityPub::Actor) : ActivityPub::Actor
- #attributed_to?(include_deleted : Bool = false, include_undone : Bool = false) : ActivityPub::Actor | Nil
- #attributed_to?(key_pair, *, dereference = false, ignore_cached = false, ignore_changed = false, **options)
- #attributed_to_iri : String | Nil
- #attributed_to_iri=(attributed_to_iri : String | Nil)
- #before_save
- #before_validate
- #canonical_path
- #canonical_path=(canonical_path : Nil | String)
- #cc : Array(String) | Nil
- #cc=(cc : Array(String) | Nil)
- #content : String | Nil
- #content=(content : String | Nil)
- #depth : Int32
- #depth=(depth : Int32)
- #display_date(timezone = nil)
- #display_link
- #draft?
- #external?
- #from_json_ld(json)
- #hashtags(include_deleted : Bool = false, include_undone : Bool = false) : Enumerable(Tag::Hashtag)
- #hashtags=(hashtags_ : Enumerable(Tag::Hashtag)) : Enumerable(Tag::Hashtag)
- #in_reply_to(include_deleted : Bool = false, include_undone : Bool = false) : ActivityPub::Object
- #in_reply_to=(in_reply_to_ : ActivityPub::Object) : ActivityPub::Object
- #in_reply_to?(include_deleted : Bool = false, include_undone : Bool = false) : ActivityPub::Object | Nil
- #in_reply_to?(key_pair, *, dereference = false, ignore_cached = false, ignore_changed = false, **options)
- #in_reply_to_iri : String | Nil
- #in_reply_to_iri=(in_reply_to_iri : String | Nil)
- #iri : String
- #iri=(iri : String)
- #likes_count : Int64
- #likes_count=(likes_count : Int64)
- #make_delete_activity
- #media_type : String | Nil
- #media_type=(media_type : String | Nil)
- #mentions(include_deleted : Bool = false, include_undone : Bool = false) : Enumerable(Tag::Mention)
- #mentions=(mentions_ : Enumerable(Tag::Mention)) : Enumerable(Tag::Mention)
- #name : String | Nil
- #name=(name : String | Nil)
- #published : Time | Nil
- #published=(published : Time | Nil)
- #replies : ActivityPub::Collection
-
#replies(*, for_actor)
Returns all replies to this object.
-
#replies(*, approved_by)
Returns all replies to this object which have been approved by
approved_by
. - #replies=(replies : ActivityPub::Collection)
- #replies? : ActivityPub::Collection | Nil
- #replies_count : Int64
- #replies_count=(replies_count : Int64)
- #replies_iri : String | Nil
- #replies_iri=(replies_iri : String | Nil)
- #root?
- #short_date(timezone = nil)
- #source : Source | Nil
- #source=(source : Source | Nil)
- #summary : String | Nil
- #summary=(summary : String | Nil)
- #tags
- #thread : String | Nil
-
#thread(*, for_actor)
Returns all objects in the thread to which this object belongs.
-
#thread(*, approved_by)
Returns all objects in the thread to which this object belongs which have been approved by
approved_by
. - #thread=(thread : String | Nil)
- #to : Array(String) | Nil
- #to=(to : Array(String) | Nil)
- #to_json_ld(recursive = true)
- #urls : Array(String) | Nil
- #urls=(urls : Array(String) | Nil)
- #validate_model
- #visible : Bool
- #visible=(visible : Bool)
- #with_replies_count!(approved_by)
- #with_replies_count!
- #with_statistics!
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::Renderable
to_html
to_html
Instance methods inherited from module Ktistec::Model::Blockable
block!
block!,
blocked?
blocked?,
blocked_at : Time | Nil
blocked_at,
blocked_at=(blocked_at : Time | Nil)
blocked_at=,
unblock!
unblock!
Instance methods inherited from module Ktistec::Model::Deletable
delete!
delete!,
deleted?
deleted?,
deleted_at : Time | Nil
deleted_at,
deleted_at=(deleted_at : Time | Nil)
deleted_at=
Instance methods inherited from module Ktistec::Model::Polymorphic
as_a(as _as : T.class) : T forall T
as_a,
type : String
type,
type=(type : String)
type=
Macros inherited from module Ktistec::Model::Polymorphic
find(_id id, *, as _as)find(*, as _as, **options) find
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 Anyassign(*, _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 Anynew(*, _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
Returns federated posts.
Includes local posts. Does not include private (not visible) posts.
Returns the count of federated posts.
Includes local posts. Does not include private (not visible) posts.
Returns the site's public posts.
Does not include private (not visible) posts and replies.
Returns the count of the site's public posts.
Does not include private (not visible) posts and replies.
Instance Method Detail
Returns all replies to this object.
Intended for presenting an object's replies to an authorized user (one who may see all objects).
The for_actor
parameter must be specified to disambiguate this
method from the #replies
property getter, but is not currently
used.
Returns all replies to this object which have been approved by
approved_by
.
Intended for presenting an object's replies to an unauthorized user (one who may not see all objects e.g. an anonymous user).
Returns all objects in the thread to which this object belongs.
Intended for presenting a thread to an authorized user (one who may see all objects in a thread).
The for_actor
parameter must be specified to disambiguate this
method from the #thread
property getter, but is not currently
used.
Returns all objects in the thread to which this object belongs
which have been approved by approved_by
.
Intended for presenting a thread to an unauthorized user (one who may not see all objects in a thread e.g. an anonymous user).