Sha256: 96bf252e8e9537e7ed0f762dced2123f5ac9629f761dcf3036fc2b90c6e78e61

Contents?: true

Size: 511 Bytes

Versions: 9

Compression:

Stored size: 511 Bytes

Contents

module Gitlab
  # @private
  class API < Request
    # @private
    attr_accessor(*Configuration::VALID_OPTIONS_KEYS)
    # @private
    alias_method :auth_token=, :private_token=

    # Creates a new API.
    # @raise [Error:MissingCredentials]
    def initialize(options={})
      options = Gitlab.options.merge(options)
      (Configuration::VALID_OPTIONS_KEYS + [:auth_token]).each do |key|
        send("#{key}=", options[key]) if options[key]
      end
      set_request_defaults(@sudo)
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
gitlab-4.2.0 lib/gitlab/api.rb
gitlab-4.1.0 lib/gitlab/api.rb
gitlab-4.0.0 lib/gitlab/api.rb
gitlab-akerl-4.0.0 lib/gitlab/api.rb
gitlab-3.7.0 lib/gitlab/api.rb
gitlab-3.6.1 lib/gitlab/api.rb
gitlab-3.6.0 lib/gitlab/api.rb
gitlab-3.5.0 lib/gitlab/api.rb
gitlab-3.4.0 lib/gitlab/api.rb