Commit c966445b6dda29ce57920a5a400c51bfa7a6b083
1 parent
fe6dd433
Exists in
staging
and in
1 other branch
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,6 +79,18 @@ module Noosfero | ||
| 79 | expose :parent_id | 79 | expose :parent_id |
| 80 | end | 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 | class Profile < Entity | 94 | class Profile < Entity |
| 83 | expose :identifier, :name, :id | 95 | expose :identifier, :name, :id |
| 84 | expose :created_at, :format_with => :timestamp | 96 | expose :created_at, :format_with => :timestamp |
| @@ -99,6 +111,7 @@ module Noosfero | @@ -99,6 +111,7 @@ module Noosfero | ||
| 99 | end | 111 | end |
| 100 | expose :image, :using => Image | 112 | expose :image, :using => Image |
| 101 | expose :region, :using => Region | 113 | expose :region, :using => Region |
| 114 | + expose :boxes, :using => Box | ||
| 102 | end | 115 | end |
| 103 | 116 | ||
| 104 | class UserBasic < Entity | 117 | class UserBasic < Entity |