class Gitlab::API
@private
Public Class Methods
new(options = {})
click to toggle source
Creates a new API
. @raise [Error:MissingCredentials] rubocop:disable Lint/MissingSuper
# File lib/gitlab/api.rb, line 14 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 request_defaults(sudo) self.class.headers 'User-Agent' => user_agent end