Commit c966445b6dda29ce57920a5a400c51bfa7a6b083

Authored by Victor Costa
1 parent fe6dd433

api: expose boxes and blocks for profiles

Showing 1 changed file with 13 additions and 0 deletions   Show diff stats
lib/noosfero/api/entities.rb
... ... @@ -79,6 +79,18 @@ module Noosfero
79 79 expose :parent_id
80 80 end
81 81  
  82 + class Block < Entity
  83 + root 'blocks', 'block'
  84 + expose :id, :type, :settings, :position, :enabled
  85 + expose :mirror, :mirror_block_id, :title
  86 + end
  87 +
  88 + class Box < Entity
  89 + root 'boxes', 'box'
  90 + expose :id, :position
  91 + expose :blocks, :using => Block
  92 + end
  93 +
82 94 class Profile < Entity
83 95 expose :identifier, :name, :id
84 96 expose :created_at, :format_with => :timestamp
... ... @@ -99,6 +111,7 @@ module Noosfero
99 111 end
100 112 expose :image, :using => Image
101 113 expose :region, :using => Region
  114 + expose :boxes, :using => Box
102 115 end
103 116  
104 117 class UserBasic < Entity
... ...