Class: DiasporaFederation::Entities::Photo

Inherits:
DiasporaFederation::Entity show all
Defined in:
lib/diaspora_federation/entities/photo.rb

Overview

This entity represents a photo and it is federated as a part of a status message.

Constant Summary

Constants inherited from DiasporaFederation::Entity

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

Instance Attribute Summary collapse

Method Summary

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, #find_property_for_xml_name, #missing_props, #optional_props, #property, #resolv_aliases, #xml_names

Methods included from Logging

included

Constructor Details

This class inherits a constructor from DiasporaFederation::Entity

Instance Attribute Details

#authorString (readonly)

The diaspora* ID of the person who uploaded the photo


17
# File 'lib/diaspora_federation/entities/photo.rb', line 17

property :author, :string, xml_name: :diaspora_handle

#created_atTime (readonly)

Photo entity creation time


27
# File 'lib/diaspora_federation/entities/photo.rb', line 27

property :created_at, :timestamp, default: -> { Time.now.utc }

#guidString (readonly)

A random string of at least 16 chars


11
# File 'lib/diaspora_federation/entities/photo.rb', line 11

property :guid, :string

#heightInteger (readonly)

Photo height


51
# File 'lib/diaspora_federation/entities/photo.rb', line 51

property :height, :integer, optional: true

#publicBoolean (readonly)

Points if the photo is visible to everyone or only to some aspects


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

property :public, :boolean, default: false

#remote_photo_nameString (readonly)


36
# File 'lib/diaspora_federation/entities/photo.rb', line 36

property :remote_photo_name, :string

#remote_photo_pathString (readonly)

An url of the photo on a remote server


32
# File 'lib/diaspora_federation/entities/photo.rb', line 32

property :remote_photo_path, :string

#status_message_guidString (readonly)

Guid of a status message this photo belongs to


46
# File 'lib/diaspora_federation/entities/photo.rb', line 46

property :status_message_guid, :string, optional: true

#textString (readonly)


40
# File 'lib/diaspora_federation/entities/photo.rb', line 40

property :text, :string, optional: true

#widthInteger (readonly)

Photo width


56
# File 'lib/diaspora_federation/entities/photo.rb', line 56

property :width, :integer, optional: true