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

Returns:

  • (String)

    author diaspora* ID

See Also:



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

property :author, :string, xml_name: :diaspora_handle

#created_atTime (readonly)

Photo entity creation time

Returns:

  • (Time)

    creation time



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

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

#edited_atTime (readonly)

The timestamp when the photo was edited

Returns:

  • (Time)

    edited time



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

property :edited_at, :timestamp, optional: true

#guidString (readonly)

A random string of at least 16 chars

Returns:

  • (String)

    guid

See Also:



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

property :guid, :string

#heightInteger (readonly)

Photo height

Returns:

  • (Integer)

    height



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

property :height, :integer, optional: true

#publicBoolean (readonly)

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

Returns:

  • (Boolean)

    is it public



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

property :public, :boolean, default: false

#remote_photo_nameString (readonly)

Returns remote photo name

Returns:

  • (String)

    remote photo name



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

property :remote_photo_name, :string

#remote_photo_pathString (readonly)

An url of the photo on a remote server

Returns:

  • (String)

    remote photo url



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

property :remote_photo_path, :string

#status_message_guidString (readonly)

Guid of a status message this photo belongs to

Returns:

  • (String)

    guid

See Also:



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

property :status_message_guid, :string, optional: true

#textString (readonly)

Returns text

Returns:

  • (String)

    text



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

property :text, :string, optional: true

#widthInteger (readonly)

Photo width

Returns:

  • (Integer)

    width



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

property :width, :integer, optional: true