struct

API::V1::Serializers::Account

Inherits JSON::Serializable < Struct < Value < Object

Serializes account data to Mastodon Account JSON format.

See: https://docs.joinmastodon.org/entities/Account/

Constructors

from_account(account : ::Account, actor : ActivityPub::Actor, include_source : Bool = false) : Account

Builds an Account from a Ktistec Account and Actor.

When include_source is true, includes the source field.

Source
from_actor(actor : ActivityPub::Actor) : Account

Builds an Account from a Ktistec Actor.

For remote actors.

Source
new(id : String, username : String, acct : String, url : Ktistec::SafeURI, uri : Ktistec::SafeURI, display_name : String, note : Ktistec::SafeHTML, avatar : Ktistec::SafeURI, avatar_static : Ktistec::SafeURI, header : Ktistec::SafeURI, header_static : Ktistec::SafeURI, locked : Bool, fields : Array(Field), emojis : Array(JSON::Any), bot : Bool, group : Bool, discoverable : Bool | Nil, indexable : Bool, created_at : String, last_status_at : String | Nil, statuses_count : Int64, followers_count : Int64, following_count : Int64, source : Source | Nil)
Source
new(pull : JSON::PullParser)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

acct
Source
acct=(acct : String)
Source
avatar
Source
avatar=(avatar : Ktistec::SafeURI)
Source
avatar_static
Source
avatar_static=(avatar_static : Ktistec::SafeURI)
Source
bot=(bot : Bool)
Source
created_at
Source
created_at=(created_at : String)
Source
discoverable
Source
discoverable=(discoverable : Bool | Nil)
Source
display_name
Source
display_name=(display_name : String)
Source
emojis
Source
emojis=(emojis : Array(JSON::Any))
Source
fields
Source
fields=(fields : Array(Field))
Source
followers_count
Source
followers_count=(followers_count : Int64)
Source
following_count
Source
following_count=(following_count : Int64)
Source
group
Source
group=(group : Bool)
Source
header
Source
header=(header : Ktistec::SafeURI)
Source
header_static
Source
header_static=(header_static : Ktistec::SafeURI)
Source
id=(id : String)
Source
indexable
Source
indexable=(indexable : Bool)
Source
last_status_at
Source
last_status_at=(last_status_at : String | Nil)
Source
locked
Source
locked=(locked : Bool)
Source
note
Source
source
Source
source=(source : Source | Nil)
Source
statuses_count
Source
statuses_count=(statuses_count : Int64)
Source
username
Source
username=(username : String)
Source

Nested types