Class: ActivityPub::StorySerializer
- Inherits:
-
BaseSerializer
- Object
- Granola::Serializer
- BaseSerializer
- ActivityPub::StorySerializer
- Defined in:
- app/serializers/activitypub/story_serializer.rb
Defined Under Namespace
Classes: TagSerializer
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 |
# File 'app/serializers/activitypub/story_serializer.rb', line 3 def data { id: ActivityPub::TagManager.instance.uri_for(object), type: object.object_type.to_s.capitalize, name: object.title, published: object.created_at.iso8601, content: object.decorate.description_html, source: source, url: url, votes: object.votes_count, attributedTo: attributed_to, to: [ActivityPub::TagManager::COLLECTIONS[:public]], tag: , } end |