Class: ActivityPub::ActorSerializer
- Inherits:
-
BaseSerializer
- Object
- Granola::Serializer
- BaseSerializer
- ActivityPub::ActorSerializer
- Defined in:
- app/serializers/activitypub/actor_serializer.rb
Constant Summary
Constants inherited from BaseSerializer
Instance Attribute Summary
Attributes inherited from BaseSerializer
Instance Method Summary collapse
Methods inherited from BaseSerializer
#as_json, #initialize, #to_json
Constructor Details
This class inherits a constructor from ActivityPub::BaseSerializer
Instance Method Details
#data ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/serializers/activitypub/actor_serializer.rb', line 3 def data result = { id: account_url(object.username), type: 'Person', name: object.display_name, preferredUsername: object.username, summary: object.bio, inbox: activitypub_account_inbox_url(object.username), outbox: outbox_activitypub_account_url(object.username), url: account_url(object.username), publicKey: public_key, } result[:icon] = icon result end |