Sha256: 3e9db4e3f5f9c2689316319233257fca5138d6c2a98ed09c46db65d52bd42531

Contents?: true

Size: 1.1 KB

Versions: 26

Compression:

Stored size: 1.1 KB

Contents

# frozen_string_literal: true

class Gitlab::Client
  # Defines methods related to deployments.
  # @see https://docs.gitlab.com/ce/api/deployments.html
  module Deployments
    # Gets a list of project deployments.
    #
    # @example
    #   Gitlab.deployments(5)
    #   Gitlab.deployments(5, { per_page: 10, page:  2 })
    #
    # @param  [Integer, String] project The ID or name of a project.
    # @param  [Hash] options A customizable set of options.
    # @option options [Integer] :page The page number.
    # @option options [Integer] :per_page The number of results per page.
    # @return [Array<Gitlab::ObjectifiedHash>]
    def deployments(project, options = {})
      get("/projects/#{url_encode project}/deployments", query: options)
    end

    # Gets a single deployment.
    #
    # @example
    #   Gitlab.deployment(5, 36)
    #
    # @param  [Integer, String] project The ID or name of a project.
    # @param  [Integer] id The ID of an deployment.
    # @return [Gitlab::ObjectifiedHash]
    def deployment(project, id)
      get("/projects/#{url_encode project}/deployments/#{id}")
    end
  end
end

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
gitlab-5.1.0 lib/gitlab/client/deployments.rb
gitlab-5.0.0 lib/gitlab/client/deployments.rb
gitlab-4.20.1 lib/gitlab/client/deployments.rb
gitlab-4.20.0 lib/gitlab/client/deployments.rb
fs-gitlab-4.19.3 lib/gitlab/client/deployments.rb
fs-gitlab-4.19.2 lib/gitlab/client/deployments.rb
fs-gitlab-4.19.1 lib/gitlab/client/deployments.rb
gitlab-4.19.0 lib/gitlab/client/deployments.rb
fs-gitlab-4.18.2 lib/gitlab/client/deployments.rb
fs-gitlab-4.18.1 lib/gitlab/client/deployments.rb
gitlab-4.18.0 lib/gitlab/client/deployments.rb
gitlab-4.17.0 lib/gitlab/client/deployments.rb
gitlab-4.16.1 lib/gitlab/client/deployments.rb
gitlab-4.16.0 lib/gitlab/client/deployments.rb
gitlab-4.15.0 lib/gitlab/client/deployments.rb
gitlab-4.14.1 lib/gitlab/client/deployments.rb
gitlab-4.14.0 lib/gitlab/client/deployments.rb
gitlab-4.13.1 lib/gitlab/client/deployments.rb
gitlab-4.13.0 lib/gitlab/client/deployments.rb
gitlab-4.12.0 lib/gitlab/client/deployments.rb