add: gitea api settings

This commit is contained in:
viletyy 2022-04-22 14:03:00 +08:00
parent baf4860e46
commit deabe7f2f0
3 changed files with 23 additions and 1 deletions

View File

@ -1,4 +1,5 @@
require_relative 'common'
require_relative 'api/settings'
require_relative 'api/user'
require_relative 'api/client'
require_relative 'api/config'

View File

@ -16,8 +16,8 @@ module Gitea
@http = Http.new(@config)
end
include Gitea::Api::Settings
include Gitea::Api::User
end
end # User
end # Gitea

21
lib/gitea/api/settings.rb Normal file
View File

@ -0,0 +1,21 @@
module Gitea
module Api
module Settings
def get_settings_api(opt = {})
@http.get("/settings/api", opt)
end
def get_settings_attachment(opt = {})
@http.get("/settings/attachment", opt)
end
def get_settings_repository(opt = {})
@http.get("/settings/repository", opt)
end
def get_settings_ui(opt = {})
@http.get("/settings/ui", opt)
end
end
end # Gitea
end # Gitea