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, #missing_props, #optional_props, #property, #resolv_aliases
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
19 |
# File 'lib/diaspora_federation/entities/photo.rb', line 19 property :author, :string |
#created_at ⇒ Time (readonly)
Photo entity creation time
29 |
# File 'lib/diaspora_federation/entities/photo.rb', line 29 property :created_at, :timestamp, default: -> { Time.now.utc } |
#edited_at ⇒ Time (readonly)
The timestamp when the photo was edited
34 |
# File 'lib/diaspora_federation/entities/photo.rb', line 34 property :edited_at, :timestamp, optional: true |
#guid ⇒ String (readonly)
A random string of at least 16 chars
13 |
# File 'lib/diaspora_federation/entities/photo.rb', line 13 property :guid, :string |
#height ⇒ Integer (readonly)
Photo height
58 |
# File 'lib/diaspora_federation/entities/photo.rb', line 58 property :height, :integer, optional: true |
#public ⇒ Boolean (readonly)
Points if the photo is visible to everyone or only to some aspects
24 |
# File 'lib/diaspora_federation/entities/photo.rb', line 24 property :public, :boolean, default: false |
#remote_photo_name ⇒ String (readonly)
Returns remote photo name.
43 |
# File 'lib/diaspora_federation/entities/photo.rb', line 43 property :remote_photo_name, :string |
#remote_photo_path ⇒ String (readonly)
An url of the photo on a remote server
39 |
# File 'lib/diaspora_federation/entities/photo.rb', line 39 property :remote_photo_path, :string |
#status_message_guid ⇒ String (readonly)
Guid of a status message this photo belongs to
53 |
# File 'lib/diaspora_federation/entities/photo.rb', line 53 property :status_message_guid, :string, optional: true |
#text ⇒ String (readonly)
Returns text.
47 |
# File 'lib/diaspora_federation/entities/photo.rb', line 47 property :text, :string, optional: true |
#width ⇒ Integer (readonly)
Photo width
63 |
# File 'lib/diaspora_federation/entities/photo.rb', line 63 property :width, :integer, optional: true |