Class: Decidim::Core::UserType

Inherits:
Api::Types::BaseObject show all
Defined in:
decidim-core/lib/decidim/api/types/user_type.rb

Overview

This type represents a User.

Instance Method Summary collapse

Instance Method Details

#avatar_urlObject


38
39
40
# File 'decidim-core/lib/decidim/api/types/user_type.rb', line 38

def avatar_url
  object.presenter.avatar_url(:thumb)
end

#badgeObject


58
59
60
# File 'decidim-core/lib/decidim/api/types/user_type.rb', line 58

def badge
  object.presenter.badge
end

#deletedObject


54
55
56
# File 'decidim-core/lib/decidim/api/types/user_type.rb', line 54

def deleted
  object.presenter.deleted?
end

#direct_messages_enabledObject


46
47
48
# File 'decidim-core/lib/decidim/api/types/user_type.rb', line 46

def direct_messages_enabled
  object.presenter.direct_messages_enabled?(context.to_h)
end

#groupsObject


62
63
64
# File 'decidim-core/lib/decidim/api/types/user_type.rb', line 62

def groups
  object.accepted_user_groups
end

#nicknameObject


34
35
36
# File 'decidim-core/lib/decidim/api/types/user_type.rb', line 34

def nickname
  object.presenter.nickname
end

#organization_nameObject


50
51
52
# File 'decidim-core/lib/decidim/api/types/user_type.rb', line 50

def organization_name
  object.organization.name
end

#profile_pathObject


42
43
44
# File 'decidim-core/lib/decidim/api/types/user_type.rb', line 42

def profile_path
  object.presenter.profile_path
end