mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 11:50:49 +08:00
18 lines
458 B
Ruby
18 lines
458 B
Ruby
module Gitlab
|
|
# @private
|
|
class API < Request
|
|
# @private
|
|
attr_accessor(*Configuration::VALID_OPTIONS_KEYS)
|
|
|
|
# Creates a new API.
|
|
# @raise [Error:MissingCredentials]
|
|
def initialize(options={})
|
|
options = Gitlab.options.merge(options)
|
|
Configuration::VALID_OPTIONS_KEYS.each do |key|
|
|
send("#{key}=", options[key])
|
|
end
|
|
set_request_defaults @endpoint, @private_token, @sudo
|
|
end
|
|
end
|
|
end
|