]>
cat aescling's git repositories - mastodon.git/blob - app/serializers/nodeinfo/serializer.rb
1a7d7a911397a09af6de4c65b2b4522835acd92f
1 # frozen_string_literal: true
3 class NodeInfo
::Serializer < ActiveModel
::Serializer
6 attributes
:version, :software, :protocols, :usage
13 { name
: 'mastodon', version: Mastodon
::Version.to_s
}
17 { outbound
: [], inbound
: [] }
27 total
: instance_presenter
.user_count
,
28 active_month
: instance_presenter
.active_user_count(4),
29 active_halfyear
: instance_presenter
.active_user_count(24),
32 local_posts
: instance_presenter
.status_count
,
38 def instance_presenter
39 @instance_presenter ||= InstancePresenter
.new
This page took 0.093927 seconds and 4 git commands to generate.