Sha256: d79562391fecbc33278e8ad483f39828d9458d09b3c701e1d47b3ed80a1dace1
Contents?: true
Size: 1.42 KB
Versions: 15
Compression:
Stored size: 1.42 KB
Contents
module Gitea module Api module Hat class Client # 构造Api client,用于操作Api数据 # @param opts [Hash] 构造client时的参数选项 # @option opts [string] domain [必填] gitea服务地址 # @option opts [string] hat_base_url [必填] api相对路径 # @option opts [string] admin_username [必填] 管理员账号 # @option opts [string] admin_password [必填] 管理员密码 # @option opts [string] username [选填] 用户账号 # @option opts [string] password [选填] 用户密码 # @option opts [string] gitea_token [选填] 用户token def initialize(opts) @config = Config.new(opts) Gitea::Common::Logging.set_log_file(@config.log_filepath) @http = Http.new(@config) end def config @config end def config=(config) unless config.is_a?(Gitea::Api::Hat::Config) fail Exception, "load config failure!" end @config = config @http = Http.new(config) end def token @config.token end def token=(token) @config.token = token end include Gitea::Api::Hat::Repository include Gitea::Api::Hat::Users include Gitea::Api::Hat::Organization include Gitea::Api::Hat::Admin end end # Hat end # Api end # Gitea
Version data entries
15 entries across 15 versions & 1 rubygems