class
Cryap::Database::Models::Post
- Cryap::Database::Models::Post
- Cryap::Database::Model
- Reference
- Object
Defined in:
models/post.crConstructors
- .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
- .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)
- .new(unpacker : Neo4j::PackStream::Unpacker)
Class Method Summary
- .by_apid(ap_id : URI)
- .by_id(id : String)
- .by_id(id : KSUID)
- .count
- .from_bolt(unpacker : Neo4j::PackStream::Unpacker)
- .get_public_timeline(pagination : Cryap::API::Paginator, type = :mixed, actor : LocalAccount | Nil | UUID = nil)
- .local_by_apid(ap_id : URI)
Instance Method Summary
- #accessible_for?(user : LocalAccount | Nil)
- #allow_replies? : Bool
- #ap_id : URI
- #attachment=(media : KSUID | Cryap::Database::Models::Media) : Media
- #attachments : Array(Media)
- #author : Cryap::Database::Models::Account
- #bookmark(by : KSUID | Cryap::Database::Models::Account) : Post
- #bookmarked_by?(by : Cryap::Database::Models::Account) : Bool
- #boost(by : KSUID | Cryap::Database::Models::Account, boost_id : KSUID, activity_id : URI, created_at : Time) : Boost
- #boosted_by(pagination : Cryap::API::Paginator | Nil = nil)
- #boosted_by?(by : Cryap::Database::Models::Account) : Bool
- #content : String
- #context(actor : LocalAccount | Nil) : Tuple(Array(Post), Array(Post))
- #created_at : Time
- #favourites_count : Int32
- #get_like_apid(by : Account)
- #id : KSUID
- #like(by : KSUID | Cryap::Database::Models::Account, activity_id : URI) : Post
- #liked_by(pagination : Cryap::API::Paginator | Nil = nil)
- #liked_by?(by : Cryap::Database::Models::Account) : Bool
- #local? : Bool
- #local_mentioned_users
- #mention(user : Account)
- #mentioned_users
- #mime_type : String
- #reblogs_count : Int32
- #reply : Post | Nil
- #reply=(reply : KSUID | Cryap::Database::Models::Post) : Post
- #sensitive? : Bool
- #spoiler_text : String | Nil
- #unbookmark(by : KSUID | Cryap::Database::Models::Account) : Post
- #unboost(by : KSUID | Cryap::Database::Models::Account) : Post
- #unlike(by : KSUID | Cryap::Database::Models::Account) : Post
- #visibility : String
- #within_streaming_window?
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)
#
Class Method Detail
def self.get_public_timeline(pagination : Cryap::API::Paginator, type = :mixed, actor : LocalAccount | Nil | UUID = nil)
#
Instance Method Detail
def boost(by : KSUID | Cryap::Database::Models::Account, boost_id : KSUID, activity_id : URI, created_at : Time) : Boost
#