class Cryap::Database::Models::Post

Defined in:

models/post.cr

Constructors

Class Method Summary

Instance Method Summary

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(author : KSUID | Cryap::Database::Models::Account, ap_id : URI, mime_type : String, content : String, local : Bool, id : KSUID, created_at : Time = Time.utc, sensitive = false, spoiler_text = nil, visibility : String = "public", allow_replies : Bool = true) : Post #

def self.new(token, ap_id : URI, mime_type : String, sensitive : Bool, spoiler_text : Nil | String, content : String, local : Bool, visibility : String, allow_replies : Bool, created_at : Time = Time.utc, id : KSUID = KSUID.new) #

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

Class Method Detail

def self.by_apid(ap_id : URI) #

def self.by_id(id : String) #

def self.by_id(id : KSUID) #

def self.count #

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

def self.get_public_timeline(pagination : Cryap::API::Paginator, type = :mixed, actor : LocalAccount | Nil | UUID = nil) #

def self.local_by_apid(ap_id : URI) #

Instance Method Detail

def accessible_for?(user : LocalAccount | Nil) #

def allow_replies? : Bool #

def ap_id : URI #

def attachment=(media : KSUID | Cryap::Database::Models::Media) : Media #

def attachments : Array(Media) #


def bookmark(by : KSUID | Cryap::Database::Models::Account) : Post #

def bookmarked_by?(by : Cryap::Database::Models::Account) : Bool #

def boost(by : KSUID | Cryap::Database::Models::Account, boost_id : KSUID, activity_id : URI, created_at : Time) : Boost #

def boosted_by(pagination : Cryap::API::Paginator | Nil = nil) #

def boosted_by?(by : Cryap::Database::Models::Account) : Bool #

def content : String #

def context(actor : LocalAccount | Nil) : Tuple(Array(Post), Array(Post)) #

def created_at : Time #

def favourites_count : Int32 #

def get_like_apid(by : Account) #

def id : KSUID #

def like(by : KSUID | Cryap::Database::Models::Account, activity_id : URI) : Post #

def liked_by(pagination : Cryap::API::Paginator | Nil = nil) #

def liked_by?(by : Cryap::Database::Models::Account) : Bool #

def local? : Bool #

def local_mentioned_users #

def mention(user : Account) #

def mentioned_users #

def mime_type : String #

def reblogs_count : Int32 #

def reply : Post | Nil #

def reply=(reply : KSUID | Cryap::Database::Models::Post) : Post #

def sensitive? : Bool #

def spoiler_text : String | Nil #

def unbookmark(by : KSUID | Cryap::Database::Models::Account) : Post #



def visibility : String #

def within_streaming_window? #