class ActivityPub::Actor
- ActivityPub::Actor
- Ktistec::KeyPair
- 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::Serialized
- School::DomainType
Extended Modules
Direct Known Subclasses
- ActivityPub::Actor::Application
- ActivityPub::Actor::Group
- ActivityPub::Actor::Organization
- ActivityPub::Actor::Person
- ActivityPub::Actor::Service
Defined in:
models/activity_pub/actor.crmodels/activity_pub/actor/application.cr
models/activity_pub/actor/group.cr
models/activity_pub/actor/organization.cr
models/activity_pub/actor/person.cr
models/activity_pub/actor/service.cr
rules/content_rules.cr
Constant Summary
-
ATTACHMENT_LIMIT =
4
Class Method Summary
- .attachments_from_ldjson(entry)
- .dereference?(key_pair, iri, *, ignore_cached = false, include_deleted = false, **options) : self | Nil
- .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, include_key = false, **options)
- .map_icon?(json, *selector)
- .match?(account)
Macro Summary
-
common_filters_on(first_prefix = nil, second_prefix = nil, activity_prefix = nil)
Adds common filters to a query.
Instance Method Summary
- #_association_filter_terms
- #_association_objects
- #_has_many_setter_for_filter_terms(filter_terms_ : Enumerable(FilterTerm), update_associations = true) : Enumerable(FilterTerm)
- #_has_many_setter_for_objects(objects_ : Enumerable(ActivityPub::Object), update_associations = true) : Enumerable(ActivityPub::Object)
- #all_followers(page = 1, size = 10, public = false)
- #all_following(page = 1, size = 10, public = true)
-
#all_posts(page = 1, size = 10)
Returns an actor's own posts
- #announces(page = 1, size = 10)
- #approve(object)
- #attachments : Array(Attachment) | Nil
- #attachments=(attachments : Array(Attachment) | Nil)
- #before_validate
- #display_link
- #display_name
- #down!
- #down?
- #down_at : Time | Nil
- #down_at=(down_at : Time | Nil)
- #drafts(page = 1, size = 10)
- #filter_terms(include_deleted : Bool = false, include_undone : Bool = false) : Enumerable(FilterTerm)
- #filter_terms=(filter_terms_ : Enumerable(FilterTerm)) : Enumerable(FilterTerm)
- #find_activity_for(object, inclusion = nil, exclusion = nil)
- #find_announce_for(object : Object)
- #find_like_for(object : Object)
- #follow(other : Actor, **options)
- #followers : String | Nil
- #followers=(followers : String | Nil)
- #following : String | Nil
- #following=(following : String | Nil)
- #follows?(other : Actor, **options)
- #from_json_ld(json, *, include_key = false)
- #handle
- #icon : String | Nil
- #icon=(icon : String | Nil)
- #image : String | Nil
- #image=(image : String | Nil)
- #in_inbox(page = 1, size = 10, public = true)
- #in_inbox?(object : Object, inclusion = nil, exclusion = nil)
- #in_outbox(page = 1, size = 10, public = true)
- #in_outbox?(object : Object, inclusion = nil, exclusion = nil)
- #inbox : String | Nil
- #inbox=(inbox : String | Nil)
- #iri : String
- #iri=(iri : String)
-
#known_posts(page = 1, size = 10)
Returns the actor's known posts.
- #likes(page = 1, size = 10)
- #make_delete_activity
- #name : String | Nil
- #name=(name : String | Nil)
-
#notifications(since : Time)
Returns the count of notifications for the actor since the given date.
-
#notifications(page = 1, size = 10)
Returns notifications for the actor.
- #objects(include_deleted : Bool = false, include_undone : Bool = false) : Enumerable(ActivityPub::Object)
- #objects=(objects_ : Enumerable(ActivityPub::Object)) : Enumerable(ActivityPub::Object)
- #outbox : String | Nil
- #outbox=(outbox : String | Nil)
- #pem_private_key : String | Nil
- #pem_private_key=(pem_private_key : String | Nil)
- #pem_public_key : String | Nil
- #pem_public_key=(pem_public_key : String | Nil)
- #private_key
- #public_key
-
#public_posts(page = 1, size = 10)
Returns the actor's public posts.
- #summary : String | Nil
- #summary=(summary : String | Nil)
-
#terms(page = 1, size = 10)
Returns the content filter terms for the actor.
-
#timeline(since : Time, exclude_replies = false, inclusion = nil)
Returns the count of entries in the actor's timeline since the given date.
-
#timeline(exclude_replies = false, inclusion = nil, page = 1, size = 10)
Returns entries in the actor's timeline.
- #to_json_ld(recursive = true)
- #unapprove(object)
- #up!
- #up?
- #urls : Array(String) | Nil
- #urls=(urls : Array(String) | Nil)
- #username : String | Nil
- #username=(username : String | Nil)
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::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=
Instance methods inherited from class Ktistec::KeyPair
iri
iri,
private_key
private_key,
public_key
public_key
Class Method Detail
Macro Detail
Adds common filters to a query.
The first_prefix
and second_prefix
can be either actor or
object table names.
Instance Method Detail
Returns an actor's own posts
Meant to be called on local (not cached) actors.
Includes private posts and replies!
Returns the actor's known posts.
Meant to be called on both local and cached actors.
Does not include private (not visible) posts.
Returns the count of notifications for the actor since the given date.
See #notifications(page, size)
for further details.
Returns notifications for the actor.
Meant to be called on local (not cached) actors.
Returns the actor's public posts.
Meant to be called on local (not cached) actors.
Does not include private (not visible) posts and replies.
Returns the count of entries in the actor's timeline since the given date.
See #timeline(inclusion, page, size)
for further details.
Returns entries in the actor's timeline.
Meant to be called on local (not cached) actors.
Includes private (not visible) posts and replies.
May be filtered to exclude replies (via exclude_replies
).
May be filtered to include only objects with associated
relationships of the specified type (via inclusion
).