struct

API::V1::Serializers::Instance

Inherits JSON::Serializable < Struct < Value < Object

Serializes instance metadata to Mastodon Instance v1 JSON format.

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

Note: v1 was deprecated in Mastodon 4.0.0 (2022) but retained for compatibility.

Constants

SUPPORTED_MEDIA_TYPES = Ktistec::Constants::SUPPORTED_MEDIA_TYPES

Constructors

current

Returns the cached Instance, rebuilding only when settings or posts change.

Source
new(uri : String, title : String, short_description : String, description : String, email : String, version : String, urls : Urls, stats : Stats, thumbnail : String | Nil, languages : Array(String), registrations : Bool, approval_required : Bool, invites_enabled : Bool, configuration : Configuration, contact_account : Nil, rules : Array(Rule))
Source
new(pull : JSON::PullParser)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Class methods

clear_cache!

Clears the cached instance.

For testing.

Source

Instance methods

approval_required
Source
approval_required=(approval_required : Bool)
Source
configuration
Source
configuration=(configuration : Configuration)
Source
contact_account
Source
contact_account=(contact_account : Nil)
Source
description
Source
description=(description : String)
Source
email
Source
email=(email : String)
Source
invites_enabled
Source
invites_enabled=(invites_enabled : Bool)
Source
languages
Source
languages=(languages : Array(String))
Source
registrations
Source
registrations=(registrations : Bool)
Source
rules
Source
rules=(rules : Array(Rule))
Source
short_description
Source
short_description=(short_description : String)
Source
stats
Source
stats=(stats : Stats)
Source
thumbnail
Source
thumbnail=(thumbnail : String | Nil)
Source
title
Source
title=(title : String)
Source
uri=(uri : String)
Source
urls
Source
urls=(urls : Urls)
Source
version
Source
version=(version : String)
Source

Nested types