Class: DiasporaFederation::Entities::Photo
- Inherits:
-
DiasporaFederation::Entity
- Object
- DiasporaFederation::Entity
- DiasporaFederation::Entities::Photo
- 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
-
#author ⇒ String
readonly
The diaspora* ID of the person who uploaded the photo.
-
#created_at ⇒ Time
readonly
Photo entity creation time.
-
#edited_at ⇒ Time
readonly
The timestamp when the photo was edited.
-
#guid ⇒ String
readonly
A random string of at least 16 chars.
-
#height ⇒ Integer
readonly
Photo height.
-
#public ⇒ Boolean
readonly
Points if the photo is visible to everyone or only to some aspects.
-
#remote_photo_name ⇒ String
readonly
Remote photo name.
-
#remote_photo_path ⇒ String
readonly
An url of the photo on a remote server.
-
#status_message_guid ⇒ String
readonly
Guid of a status message this photo belongs to.
-
#text ⇒ String
readonly
Text.
-
#width ⇒ Integer
readonly
Photo width.
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
Constructor Details
This class inherits a constructor from DiasporaFederation::Entity
Instance Attribute Details
#author ⇒ String (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_at ⇒ Time (readonly)
Photo entity creation time
27 |
# File 'lib/diaspora_federation/entities/photo.rb', line 27 property :created_at, :timestamp, default: -> { Time.now.utc } |
#edited_at ⇒ Time (readonly)
The timestamp when the photo was edited
32 |
# File 'lib/diaspora_federation/entities/photo.rb', line 32 property :edited_at, :timestamp, optional: true |
#guid ⇒ String (readonly)
A random string of at least 16 chars
11 |
# File 'lib/diaspora_federation/entities/photo.rb', line 11 property :guid, :string |
#height ⇒ Integer (readonly)
Photo height
56 |
# File 'lib/diaspora_federation/entities/photo.rb', line 56 property :height, :integer, optional: true |
#public ⇒ Boolean (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_name ⇒ String (readonly)
Returns remote photo name.
41 |
# File 'lib/diaspora_federation/entities/photo.rb', line 41 property :remote_photo_name, :string |
#remote_photo_path ⇒ String (readonly)
An url of the photo on a remote server
37 |
# File 'lib/diaspora_federation/entities/photo.rb', line 37 property :remote_photo_path, :string |
#status_message_guid ⇒ String (readonly)
Guid of a status message this photo belongs to
51 |
# File 'lib/diaspora_federation/entities/photo.rb', line 51 property :status_message_guid, :string, optional: true |
#text ⇒ String (readonly)
Returns text.
45 |
# File 'lib/diaspora_federation/entities/photo.rb', line 45 property :text, :string, optional: true |
#width ⇒ Integer (readonly)
Photo width
61 |
# File 'lib/diaspora_federation/entities/photo.rb', line 61 property :width, :integer, optional: true |