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, #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

Returns:

  • (String)

    diaspora* ID

See Also:



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

property :author, :string, alias: :diaspora_id

#bioString (readonly)

Returns bio of the person.

Returns:

  • (String)

    bio of the person



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

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

#diaspora_idString (readonly)

Alias for author

Returns:

  • (String)

    diaspora* ID

See Also:



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

property :author, :string, alias: :diaspora_id

#edited_atTime (readonly)

The timestamp when the profile was edited

Returns:

  • (Time)

    edited time



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

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:



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

property :first_name, :string, optional: true

#full_nameString (readonly)

Returns display name of the user.

Returns:

  • (String)

    display name of the user



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

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:



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

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:



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

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:



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

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:



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

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



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

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

#searchableBoolean (readonly)

Returns searchable flag.

Returns:

  • (Boolean)

    searchable flag

See Also:



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

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



79
80
81
# File 'lib/diaspora_federation/entities/profile.rb', line 79

def to_s
  "Profile:#{author}"
end