Module: Gitlab::Client::ProjectReleaseLinks
- Included in:
- Gitlab::Client
- Defined in:
- lib/gitlab/client/project_release_links.rb
Overview
Defines methods related to project release links.
Instance Method Summary collapse
-
#create_project_release_link(project, tag_name, options = {}) ⇒ Gitlab::ObjectifiedHash
Create an asset as a link from a Release.
-
#delete_project_release_link(project, tag_name, link_id) ⇒ Gitlab::ObjectifiedHash
Delete an asset as a link from a Release.
-
#project_release_link(project, tag_name, link_id) ⇒ Gitlab::ObjectifiedHash
Get an asset as link from a Release.
-
#project_release_links(project, tag_name) ⇒ Array<Gitlab::ObjectifiedHash>
Get assets as links from a Release.
-
#update_project_release_link(project, tag_name, link_id, options = {}) ⇒ Gitlab::ObjectifiedHash
Update an asset as a link from a Release.
Instance Method Details
#create_project_release_link(project, tag_name, options = {}) ⇒ Gitlab::ObjectifiedHash
Create an asset as a link from a Release.
43 44 45 |
# File 'lib/gitlab/client/project_release_links.rb', line 43 def create_project_release_link(project, tag_name, = {}) post("/projects/#{url_encode project}/releases/#{tag_name}/assets/links", body: ) end |
#delete_project_release_link(project, tag_name, link_id) ⇒ Gitlab::ObjectifiedHash
Delete an asset as a link from a Release.
72 73 74 |
# 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 |
#project_release_link(project, tag_name, link_id) ⇒ Gitlab::ObjectifiedHash
Get an asset as link from a Release.
28 29 30 |
# 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 |
#project_release_links(project, tag_name) ⇒ Array<Gitlab::ObjectifiedHash>
Get assets as links from a Release.
15 16 17 |
# 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 |
#update_project_release_link(project, tag_name, link_id, options = {}) ⇒ Gitlab::ObjectifiedHash
Update an asset as a link from a Release. You have to specify at least one of name or url
59 60 61 |
# File 'lib/gitlab/client/project_release_links.rb', line 59 def update_project_release_link(project, tag_name, link_id, = {}) put("/projects/#{url_encode project}/releases/#{tag_name}/assets/links/#{link_id}", body: ) end |