diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-08-06 12:16:36 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-08-06 12:16:36 +0200 |
commit | 4f24eb2aa670877faeef0f486af00d74e007ad01 (patch) | |
tree | 3b8c9ccbe779050db829565910e8652392af4dcf /lib/api/entities.rb | |
parent | c6799b0e1ecd1b7373f0ea23195e18c7ad5c199d (diff) | |
parent | fff36a8b8965e4bddd8020caf5072e79bf131a74 (diff) | |
download | gitlab-ce-merge-notifs.tar.gz |
Merge branch 'master' into merge-notifsmerge-notifs
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r-- | lib/api/entities.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index ecf1412dee5..b5556682449 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -6,6 +6,10 @@ module API class UserBasic < UserSafe expose :id, :state, :avatar_url + + expose :web_url do |user, options| + Rails.application.routes.url_helpers.user_url(user) + end end class User < UserBasic @@ -31,6 +35,10 @@ module API expose :private_token end + class Email < Grape::Entity + expose :id, :email + end + class Hook < Grape::Entity expose :id, :url, :created_at end @@ -59,6 +67,7 @@ module API expose :namespace expose :forked_from_project, using: Entities::ForkedFromProject, if: lambda{ | project, options | project.forked? } expose :avatar_url + expose :star_count, :forks_count end class ProjectMember < UserBasic @@ -69,6 +78,11 @@ module API class Group < Grape::Entity expose :id, :name, :path, :description + expose :avatar_url + + expose :web_url do |group, options| + Rails.application.routes.url_helpers.group_url(group) + end end class GroupDetail < Group |