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.
Builds an Account from a Ktistec Actor.
For remote actors.
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)
Sourcenew(pull : JSON::PullParser)
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
SourceInstance methods
acct
Sourceacct=(acct : String)
Sourceavatar
Sourceavatar=(avatar : Ktistec::SafeURI)
Sourceavatar_static
Sourceavatar_static=(avatar_static : Ktistec::SafeURI)
Sourcebot
Sourcebot=(bot : Bool)
Sourcecreated_at
Sourcecreated_at=(created_at : String)
Sourcediscoverable
Sourcediscoverable=(discoverable : Bool | Nil)
Sourcedisplay_name
Sourcedisplay_name=(display_name : String)
Sourceemojis
Sourcefields
Sourcefollowers_count
Sourcefollowers_count=(followers_count : Int64)
Sourcefollowing_count
Sourcefollowing_count=(following_count : Int64)
Sourcegroup
Sourcegroup=(group : Bool)
Sourceheader
Sourceheader=(header : Ktistec::SafeURI)
Sourceheader_static
Sourceheader_static=(header_static : Ktistec::SafeURI)
Sourceid
Sourceid=(id : String)
Sourceindexable
Sourceindexable=(indexable : Bool)
Sourcelast_status_at
Sourcelast_status_at=(last_status_at : String | Nil)
Sourcelocked
Sourcelocked=(locked : Bool)
Sourcenote
Sourcenote=(note : Ktistec::SafeHTML)
Sourcesource
Sourcesource=(source : Source | Nil)
Sourcestatuses_count
Sourcestatuses_count=(statuses_count : Int64)
Sourceuri
Sourceuri=(uri : Ktistec::SafeURI)
Sourceurl
Sourceurl=(url : Ktistec::SafeURI)
Sourceusername
Sourceusername=(username : String)
Source