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

Returns:

  • (String)

    diaspora* ID

See Also:



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

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

#bioString (readonly)

Returns bio of the person

Returns:

  • (String)

    bio of the person



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

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

#diaspora_idString (readonly)

Alias for author

Returns:

  • (String)

    diaspora* ID

See Also:



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

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

#edited_atTime (readonly)

The timestamp when the profile was edited

Returns:

  • (Time)

    edited time



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

property :edited_at, :timestamp, optional: true

#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

Returns:

  • (String)

    first name

See Also:



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

property :first_name, :string, optional: true

#full_nameString (readonly)

Returns display name of the user

Returns:

  • (String)

    display name of the user



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

property :full_name, :string, optional: true

#image_urlString (readonly)

Returns url to the big avatar (300x300)

Returns:

  • (String)

    url to the big avatar (300x300)

See Also:



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

property :image_url, :string, optional: true

#image_url_mediumString (readonly)

Returns url to the medium avatar (100x100)

Returns:

  • (String)

    url to the medium avatar (100x100)

See Also:



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

property :image_url_medium, :string, optional: true

#image_url_smallString (readonly)

Returns url to the small avatar (50x50)

Returns:

  • (String)

    url to the small avatar (50x50)

See Also:



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

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

Returns:

  • (String)

    last name

See Also:



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

property :last_name, :string, optional: true

#publicBoolean (readonly)

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

Returns:

  • (Boolean)

    is it public



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

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

#searchableBoolean (readonly)

Returns searchable flag

Returns:

  • (Boolean)

    searchable flag

See Also:



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

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

Instance Method Details

#to_sString

Returns string representation of this object

Returns:

  • (String)

    string representation of this object



77
78
79
# File 'lib/diaspora_federation/entities/profile.rb', line 77

def to_s
  "Profile:#{author}"
end