module Gitlab::Client::ProjectReleaseLinks
Defines methods related to project release links. @see docs.gitlab.com/ce/api/releases/links.html
Public Instance Methods
Source
# File lib/gitlab/client/project_release_links.rb, line 43 def create_project_release_link(project, tag_name, options = {}) post("/projects/#{url_encode project}/releases/#{tag_name}/assets/links", body: options) end
Create an asset as a link from a Release.
@example
Gitlab.create_project_release_link(5, 'v0.1', { name: 'awesome-v0.2.dmg', url: 'http://192.168.10.15:3000' })
@param [Integer, String] project The ID or name of a project. @param [String] tag_name The tag associated with the Release. @param [Hash] options A customizable set of options. @option options [String] :name(required) The name of the link. @option options [String] :url(required) The URL of the link. @return [Gitlab::ObjectifiedHash] Information about the created release link.
Source
# File lib/gitlab/client/project_release_links.rb, line 72 def delete_project_release_link(project, tag_name, link_id) delete("/projects/#{url_encode project}/releases/#{tag_name}/assets/links/#{link_id}") end
Delete an asset as a link from a Release.
@example
Gitlab.delete_project_release_link(5, 'v0.3', 1)
@param [Integer, String] project The ID or name of a project. @param [String] tag_name The tag where the release will be created from. @param [Integer] link_id The id of the link. @return [Gitlab::ObjectifiedHash] Information about the deleted release link.
Source
# File lib/gitlab/client/project_release_links.rb, line 28 def project_release_link(project, tag_name, link_id) get("/projects/#{url_encode project}/releases/#{tag_name}/assets/links/#{link_id}") end
Get an asset as link from a Release.
@example
Gitlab.project_release_link(5, 'v0.3', 1)
@param [Integer, String] project The ID or name of a project. @param [String] tag_name The tag associated with the Release. @param [Integer] link_id The id of the link. @return [Gitlab::ObjectifiedHash] Information about the release link
Source
# File lib/gitlab/client/project_release_links.rb, line 15 def project_release_links(project, tag_name) get("/projects/#{url_encode project}/releases/#{tag_name}/assets/links") end
Get assets as links from a Release.
@example
Gitlab.project_release_links(5, 'v0.3')
@param [Integer, String] project The ID or name of a project. @param [String] tag_name The tag associated with the Release. @return [Array<Gitlab::ObjectifiedHash>] List of assets as links from a Release.
Source
# File lib/gitlab/client/project_release_links.rb, line 59 def update_project_release_link(project, tag_name, link_id, options = {}) put("/projects/#{url_encode project}/releases/#{tag_name}/assets/links/#{link_id}", body: options) end
Update an asset as a link from a Release. You have to specify at least one of name or url
@example
Gitlab.update_project_release_link(5, 'v0.3', 1, { name: 'awesome-v0.2.dmg', url: 'http://192.168.10.15:3000' })
@param [Integer, String] project The ID or name of a project. @param [String] tag_name The tag where the release will be created from. @param [Integer] link_id The id of the link. @param [Hash] options A customizable set of options. @option options [String] :name(optional) The name of the link. @option options [String] :url(optional) The URL of the link. @return [Gitlab::ObjectifiedHash] Information about the updated release link.