debian-mirror-gitlab/lib/api/entities/releases/link.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
386 B
Ruby
Raw Normal View History

2020-03-13 15:44:24 +05:30
# frozen_string_literal: true
module API
module Entities
module Releases
class Link < Grape::Entity
expose :id
expose :name
expose :url
2022-07-23 23:45:48 +05:30
expose :direct_asset_url do |link|
::Releases::LinkPresenter.new(link).direct_asset_url
end
2020-03-13 15:44:24 +05:30
expose :external?, as: :external
2020-06-23 00:09:42 +05:30
expose :link_type
2020-03-13 15:44:24 +05:30
end
end
end
end