Welcome to mirror list, hosted at ThFree Co, Russian Federation.

entities.rb « v3 « api « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3cc0dc968a82bc46ec7bbe9055711a528f0728a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
module API
  module V3
    module Entities
      class ProjectSnippet < Grape::Entity
        expose :id, :title, :file_name
        expose :author, using: ::API::Entities::UserBasic
        expose :updated_at, :created_at
        expose(:expires_at) { |snippet| nil }

        expose :web_url do |snippet, options|
          Gitlab::UrlBuilder.build(snippet)
        end
      end
    end
  end
end