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

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:



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

property :author, :string

#created_atTime (readonly)

Photo entity creation time

Returns:

  • (Time)

    creation time



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

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

#edited_atTime (readonly)

The timestamp when the photo was edited

Returns:

  • (Time)

    edited time



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

property :edited_at, :timestamp, optional: true

#guidString (readonly)

A random string of at least 16 chars

Returns:

  • (String)

    guid

See Also:



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

property :guid, :string

#heightInteger (readonly)

Photo height

Returns:

  • (Integer)

    height



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

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



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

property :public, :boolean, default: false

#remote_photo_nameString (readonly)

Returns remote photo name.

Returns:

  • (String)

    remote photo name



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

property :remote_photo_name, :string

#remote_photo_pathString (readonly)

An url of the photo on a remote server

Returns:

  • (String)

    remote photo url



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

property :remote_photo_path, :string

#status_message_guidString (readonly)

Guid of a status message this photo belongs to

Returns:

  • (String)

    guid

See Also:



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

property :status_message_guid, :string, optional: true

#textString (readonly)

Returns text.

Returns:

  • (String)

    text



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

property :text, :string, optional: true

#widthInteger (readonly)

Photo width

Returns:

  • (Integer)

    width



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

property :width, :integer, optional: true