summaryrefslogtreecommitdiff
path: root/lib/api/entities.rb
blob: 44a439856020b31765484721dccb220b50835edc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
module Gitlab
  module Entities
    class User < Grape::Entity
      expose :id, :email, :name, :bio, :skype, :linkedin, :twitter,
             :dark_scheme, :theme_id, :blocked, :created_at
    end

    class Project < Grape::Entity
      expose :id, :code, :name, :description, :path, :default_branch
      expose :owner, :using => Entities::User
      expose :private_flag, :as => :private
      expose :issues_enabled, :merge_requests_enabled, :wall_enabled, :wiki_enabled, :created_at
    end

    class ProjectRepositoryBranches < Grape::Entity
      expose :name, :commit
    end

    class ProjectRepositoryTags < Grape::Entity
      expose :name, :commit
    end
  end
end