Class: DiasporaFederation::Entities::Profile

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

Overview

This entity contains all the profile data of a person.

Constant Summary

Constants inherited from DiasporaFederation::Entity

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DiasporaFederation::Entity

class_name, entity_class, entity_name, from_hash, from_json, from_xml, #initialize, #to_h, #to_json, #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


15
# File 'lib/diaspora_federation/entities/profile.rb', line 15

property :author, :string, alias: :diaspora_id, xml_name: :diaspora_handle

#bioString (readonly)


48
# File 'lib/diaspora_federation/entities/profile.rb', line 48

property :bio, :string, alias: :text, optional: true

#diaspora_idString (readonly)

Alias for author

See Also:


15
# File 'lib/diaspora_federation/entities/profile.rb', line 15

property :author, :string, alias: :diaspora_id, xml_name: :diaspora_handle

#first_nameString (readonly)

Deprecated.

We decided to only use one name field, these should be removed in later iterations (will affect older diaspora* installations).

Returns first name

See Also:


23
# File 'lib/diaspora_federation/entities/profile.rb', line 23

property :first_name, :string, optional: true

#image_urlString (readonly)

Returns url to the big avatar (300x300)


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

property :image_url, :string, optional: true

#image_url_mediumString (readonly)

Returns url to the medium avatar (100x100)


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

property :image_url_medium, :string, optional: true

#image_url_smallString (readonly)

Returns url to the small avatar (50x50)


44
# File 'lib/diaspora_federation/entities/profile.rb', line 44

property :image_url_small, :string, optional: true

#last_nameString (readonly)

Deprecated.

We decided to only use one name field, these should be removed in later iterations (will affect older diaspora* installations).

Returns last name

See Also:


31
# File 'lib/diaspora_federation/entities/profile.rb', line 31

property :last_name, :string, optional: true

#publicBoolean (readonly)

Shows whether the profile is visible to everyone or only to contacts


62
# File 'lib/diaspora_federation/entities/profile.rb', line 62

property :public, :boolean, optional: true, default: false

#searchableBoolean (readonly)

Returns searchable flag


57
# File 'lib/diaspora_federation/entities/profile.rb', line 57

property :searchable, :boolean, optional: true, default: true

Instance Method Details

#to_sString


68
69
70
# File 'lib/diaspora_federation/entities/profile.rb', line 68

def to_s
  "Profile:#{author}"
end