class Cryap::Database::Models::LocalAccount

Defined in:

models/users/local_account.cr

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from class Cryap::Database::Models::Account

acct acct, ap_id : URI ap_id, avatar avatar, avatar=(avatar : KSUID | Media) avatar=, banner banner, banner=(banner : KSUID | Media) banner=, bookmarked_posts(pagination : Cryap::API::Paginator | Nil = nil) bookmarked_posts, bot=(value : Bool) bot=, bot? : Bool bot?, confirm_follow(followee : Account, activity_id : URI | Nil) confirm_follow, created_at : Time created_at, delete delete, discoverable=(value : Bool) discoverable=, discoverable? : Bool discoverable?, display_name : String display_name, display_name=(value : String) display_name=, follow_requests(pagination : Cryap::API::Paginator | Nil = nil) follow_requests, follow_requests_count follow_requests_count, followers(page : Int32)
followers(pagination : Cryap::API::Paginator | Nil = nil)
followers
, followers_count : Int32 followers_count, followers_uri : URI followers_uri, following(page : Int32)
following(pagination : Cryap::API::Paginator | Nil = nil)
following
, following_count : Int32 following_count, follows?(account : Account) : Bool follows?, get_follow_apid(to : Account) get_follow_apid, id : KSUID id, inbox_uri : URI inbox_uri, instance : String instance, is_cat=(value : Bool) is_cat=, is_cat? : Bool is_cat?, liked_posts(pagination : Cryap::API::Paginator | Nil = nil) liked_posts, local? : Bool local?, local_followers local_followers, manually_approves_followers=(value : Bool) manually_approves_followers=, manually_approves_followers? : Bool manually_approves_followers?, name : String name, outbox_uri : URI outbox_uri, posts(pagination : Cryap::API::Paginator, actor : LocalAccount | Nil = nil) posts, private_note(by : LocalAccount) private_note, public_key public_key, public_key=(key) public_key=, set_private_note(note : String | Nil, by : LocalAccount) set_private_note, shared_inbox_uri : URI shared_inbox_uri, statuses_count : Int32 statuses_count, summary : String summary, summary=(value : String) summary=, unfollow(followee : Account) unfollow, updated_at : Time updated_at, want_to_follow(followee : Account, activity_id : URI) want_to_follow, wants_to_follow?(account : Account) : Bool wants_to_follow?

Constructor methods inherited from class Cryap::Database::Models::Account

new(ap_id : URI, name : String, instance : String, display_name : String = name, id : KSUID = KSUID.new, shared_inbox_uri : URI = nil, summary : String = "", followers_uri : URI = URI.parse("#{ap_id}/followers"), outbox_uri : URI = URI.parse("#{ap_id}/outbox"), inbox_uri : URI = URI.parse("#{ap_id}/inbox"), manually_approves_followers : Bool = true, discoverable : Bool = true, bot : Bool = false, is_cat : Bool = false, created_at : Time = Time.utc, updated_at : Time = Time.utc)
new(unpacker : Neo4j::PackStream::Unpacker)
new

Class methods inherited from class Cryap::Database::Models::Account

by_acct(acct : String) by_acct, by_apid(ap_id : URI) by_apid, by_id(id : String)
by_id(id : KSUID)
by_id
, from_bolt(unpacker : Neo4j::PackStream::Unpacker) from_bolt, get_instances get_instances, get_remote_accounts_ap_ids(skip : Int, limit : Int) get_remote_accounts_ap_ids, get_remote_inboxes get_remote_inboxes

Instance methods inherited from class Cryap::Database::UpdatableModel

changed? : Bool changed?, id id, reset_updates reset_updates, save save

Constructor methods inherited from class Cryap::Database::UpdatableModel

new(unpacker : Neo4j::PackStream::Unpacker) new

Class methods inherited from class Cryap::Database::UpdatableModel

from_bolt(unpacker : Neo4j::PackStream::Unpacker) from_bolt

Macros inherited from class Cryap::Database::UpdatableModel

field_setter(property_name) field_setter

Instance methods inherited from class Cryap::Database::Model

node_id : Int64 node_id, node_labels : Array(String) node_labels, paginate!(pagination : Cryap::API::Paginator, result : Array(String | Symbol), forward : Array(String | Symbol), column : Symbol, property : Symbol | Nil = nil, &) : Tuple(String, String | Nil) paginate!

Constructor methods inherited from class Cryap::Database::Model

new(unpacker : Neo4j::PackStream::Unpacker)
new(node : Neo4j::Node)
new

Class methods inherited from class Cryap::Database::Model

from_bolt(unpacker : Neo4j::PackStream::Unpacker)
from_bolt(io : IO)
from_bolt
, model_name model_name, paginate!(pagination : Cryap::API::Paginator, result : Array(String | Symbol), forward : Array(String | Symbol), column : Symbol, property : Symbol | Nil = nil, &) : Tuple(String, String | Nil) paginate!

Macros inherited from class Cryap::Database::Model

model(name) model, query!(&block) query!

Constructor Detail

def self.create(ap_id : URI, id : KSUID, name : String, instance : String, password : Crypto::Bcrypt::Password, public_key : String, private_key : String, followers_uri : URI = ap_id.dup.tap do |uri| uri.path = uri.path + "/ap/followers" end, outbox_uri : URI = ap_id.dup.tap do |uri| uri.path = uri.path + "/ap/outbox" end, inbox_uri : URI = ap_id.dup.tap do |uri| uri.path = uri.path + "/ap/inbox" end, shared_inbox_uri : URI = ap_id.dup.tap(&.path = "/inbox"), _labels = ["Account", "LocalAccount", "Person"] of ::String) : LocalAccount #

def self.new(ap_id, name, instance, display_name, password : Crypto::Bcrypt::Password, id = KSUID.new, summary = "", manually_approves_followers = false, discoverable = true, followers_uri = URI.parse("#{ap_id}/followers"), outbox_uri = URI.parse("#{ap_id}/ap/outbox"), inbox_uri = URI.parse("#{ap_id}/ap/inbox"), shared_inbox_uri = URI.parse("https://#{ap_id.host}/inbox"), bot = false, is_cat = false, created_at = Time.utc, updated_at = Time.utc) #

def self.new(unpacker : Neo4j::PackStream::Unpacker) #

Class Method Detail

def self.by_acct(acct : String) #

def self.by_id(id : KSUID) #

def self.by_name(name : String) #

def self.count #

def self.from_bolt(unpacker : Neo4j::PackStream::Unpacker) #

Instance Method Detail

def admin? #

def get_home_timeline(pagination : Cryap::API::Paginator) #

def password : Crypto::Bcrypt::Password #

def private_key #