Class: DiasporaFederation::Entities::Like

Inherits:
DiasporaFederation::Entity show all
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

Constants included from Signable

Signable::DIGEST

Constants inherited from DiasporaFederation::Entity

DiasporaFederation::Entity::ENTITY_NAME_REGEX, DiasporaFederation::Entity::INVALID_XML_REGEX

Instance Attribute Summary collapse

Attributes included from Relayable

#additional_data, #author, #author_signature, #guid, #parent, #parent_guid

Method Summary

Methods included from Relayable

included, #initialize, #sender_valid?, #signature_order, #to_json, #to_s, #verify_signature

Methods included from Signable

#sign_with_key, #signature_data, #verify_signature

Methods included from Logging

included

Methods inherited from DiasporaFederation::Entity

class_name, entity_class, entity_name, from_hash, from_json, from_xml, #initialize, #to_h, #to_json, #to_s, #to_xml

Methods included from PropertiesDSL

#class_props, #default_values, #entity, #missing_props, #optional_props, #property, #resolv_aliases

Instance Attribute Details

#parent_typeString (readonly)

A string describing the type of the parent Can be “Post” or “Comment” (Comments are currently not implemented in the diaspora* frontend).

Returns:

  • (String)

    parent type



16
# File 'lib/diaspora_federation/entities/like.rb', line 16

property :parent_type, :string

#positiveBoolean (readonly)

If true set a like, if false, set a dislike (dislikes are currently not implemented in the diaspora* frontend).

Returns:

  • (Boolean)

    is it a like or a dislike



22
# File 'lib/diaspora_federation/entities/like.rb', line 22

property :positive, :boolean