Class: DiasporaFederation::Entities::Like
- Inherits:
-
DiasporaFederation::Entity
- Object
- DiasporaFederation::Entity
- DiasporaFederation::Entities::Like
- Includes:
- Relayable
- Defined in:
- lib/diaspora_federation/entities/like.rb
Overview
This entity represents a like to some kind of post (e.g. status message).
Constant Summary collapse
- LEGACY_SIGNATURE_ORDER =
Deprecated.
Old signature order
%i(positive guid parent_type parent_guid author).freeze
Constants included from Relayable
Constants inherited from DiasporaFederation::Entity
DiasporaFederation::Entity::INVALID_XML_REGEX
Instance Attribute Summary collapse
-
#parent_type ⇒ String
readonly
A string describing the type of the parent Can be “Post” or “Comment” (Comments are currently not implemented in the diaspora* frontend).
-
#positive ⇒ Boolean
readonly
If
true
set a like, iffalse
, set a dislike (dislikes are currently not implemented in the diaspora* frontend).
Attributes included from Relayable
#additional_xml_elements, #author, #author_signature, #guid, #parent, #parent_author_signature, #parent_guid, #xml_order
Method Summary
Methods included from Relayable
included, #initialize, #sender_valid?, #to_s, #verify_signatures
Methods included from Logging
Methods inherited from DiasporaFederation::Entity
entity_class, entity_name, from_xml, #initialize, #to_h, #to_s, #to_xml
Methods included from PropertiesDSL
#class_props, #default_values, #entity, #find_property_for_xml_name, #missing_props, #property, #resolv_aliases, #xml_names
Instance Attribute Details
#parent_type ⇒ String (readonly)
A string describing the type of the parent Can be “Post” or “Comment” (Comments are currently not implemented in the diaspora* frontend).
24 |
# File 'lib/diaspora_federation/entities/like.rb', line 24 property :parent_type, xml_name: :target_type |
#positive ⇒ Boolean (readonly)
If true
set a like, if false
, set a dislike (dislikes are currently not implemented in the diaspora* frontend).
17 |
# File 'lib/diaspora_federation/entities/like.rb', line 17 property :positive |