class Account
- Account
- Reference
- Object
Overview
An ActivityPub account.
Also an account.
Included Modules
Extended Modules
Defined in:
models/account.crConstructors
-
.new(_username username : String, _password password : String, **options)
Allocates a new account.
Instance Method Summary
- #_association_actor
- #_association_last_times
- #_association_sessions
- #_belongs_to_setter_for_actor(actor_ : ActivityPub::Actor, update_associations = true) : ActivityPub::Actor
- #_has_many_setter_for_last_times(last_times_ : Enumerable(LastTime), update_associations = true) : Enumerable(LastTime)
- #_has_many_setter_for_sessions(sessions_ : Enumerable(Session), update_associations = true) : Enumerable(Session)
- #actor(include_deleted : Bool = false, include_undone : Bool = false) : ActivityPub::Actor
- #actor=(actor_ : ActivityPub::Actor) : ActivityPub::Actor
- #actor?(include_deleted : Bool = false, include_undone : Bool = false) : ActivityPub::Actor | Nil
- #after_save
- #before_save
- #before_validate
-
#check_password(password)
Checks the given password against the encrypted password.
- #encrypted_password : String
- #iri : String
- #iri=(iri : String)
- #last_notifications_checked_at
- #last_timeline_checked_at
- #last_times(include_deleted : Bool = false, include_undone : Bool = false) : Enumerable(LastTime)
- #last_times=(last_times_ : Enumerable(LastTime)) : Enumerable(LastTime)
- #password : String?
- #password=(password)
- #sessions(include_deleted : Bool = false, include_undone : Bool = false) : Enumerable(Session)
- #sessions=(sessions_ : Enumerable(Session)) : Enumerable(Session)
- #timezone : String
- #timezone=(timezone : String)
-
#uid
permits an account to be used in path helpers in place of an actor.
- #update_last_notifications_checked_at(time = Time.utc)
- #update_last_timeline_checked_at(time = Time.utc)
- #username : String
- #username=(username : String)
- #validate_model
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=
Constructor Detail
def self.new(_username username : String, _password password : String, **options)
#
Allocates a new account.
This constructor is used to create new accounts (which must have a valid username and password).
Instance Method Detail
def _belongs_to_setter_for_actor(actor_ : ActivityPub::Actor, update_associations = true) : ActivityPub::Actor
#
def _has_many_setter_for_last_times(last_times_ : Enumerable(LastTime), update_associations = true) : Enumerable(LastTime)
#
def _has_many_setter_for_sessions(sessions_ : Enumerable(Session), update_associations = true) : Enumerable(Session)
#
def actor?(include_deleted : Bool = false, include_undone : Bool = false) : ActivityPub::Actor | Nil
#
def last_times(include_deleted : Bool = false, include_undone : Bool = false) : Enumerable(LastTime)
#