class ActivityPub::Actor
- ActivityPub::Actor
- Ktistec::KeyPair
- Reference
- Object
Included Modules
- ActivityPub
- Ktistec::Model({Common, Blockable, Deletable, Polymorphic, Serialized, Linked})
- 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
models/activity_pub/collection/ordered_collection.cr
rules/content_rules.cr
Constant Summary
-
ATTACHMENT_LIMIT =
4
Class Method Summary
- .attachments_from_ldjson(entry)
- .dereference?(key_pair, iri, *, ignore_cached = 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, *, include_key = false, **options)
- .map_icon?(json)
- .match?(account)
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)
- #account_uri
- #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
- #approve(object)
- #attachments : Array(Attachment) | Nil
- #attachments=(attachments : Array(Attachment) | Nil)
- #before_validate
- #display_link
- #display_name
- #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)
- #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.
- #make_delete_activity
- #name : String | Nil
- #name=(name : String | Nil)
-
#notifications(since : Time)
Returns the count of notification activities for the actor since the given date.
-
#notifications(page = 1, size = 10)
Returns notification activities 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 objects in the actor's timeline since the given date.
-
#timeline(exclude_replies = false, inclusion = nil, page = 1, size = 10)
Returns objects in the actor's timeline.
- #to_json_ld(recursive = true)
- #unapprove(object)
- #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::Linked
cached?
cached?,
local?
local?,
origin
origin,
to_s(io : IO)
to_s,
uid
uid
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=
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::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::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,
_update_property(property, value)
_update_property,
assign(options : Hash(String, Any)) forall Anyassign(**options) assign, changed!(property : Symbol) changed!, changed?(property : Symbol | Nil = nil) changed?, clear!(property : Symbol | Nil = nil) clear!, destroy destroy, destroyed? destroyed?, errors errors, inspect(io : IO) inspect, new_record? new_record?, 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, valid?(skip_associated = false) valid?, validate(skip_associated = false) validate
Constructor methods inherited from module Ktistec::Model::InstanceMethods
new(options : Hash(String, Any)) forall Anynew(**options) new
Instance methods inherited from module Ktistec::Model({Common, Blockable, Deletable, Polymorphic, Serialized, Linked})
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
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 notification activities for the actor since the given date.
See #notifications(page, size)
for further details.
Returns notification activities for the actor.
Meant to be called on local (not cached) actors.
Note: filters out activities that have associated objects that have been deleted. does not filter out activities that are not associated with an object since some activities, like follows, are associated with actors. doesn't worry about actors that have been deleted since follows, the activities we care about in this case, are associated with the actor on which this method is called.
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 objects in the actor's timeline since the given date.
See #timeline(inclusion, page, size)
for further details.
Returns objects 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
activities of the specified type (via inclusion
).