add: gitea api admin

This commit is contained in:
viletyy 2022-05-05 15:08:36 +08:00
parent 7c4d503814
commit 2cff9bd157
3 changed files with 23 additions and 0 deletions

View File

@ -5,6 +5,7 @@ require_relative 'api/settings'
require_relative 'api/user'
require_relative 'api/organization'
require_relative 'api/notification'
require_relative 'api/miscellaneous'
require_relative 'api/client'
require_relative 'api/config'
require_relative 'api/exception'

View File

@ -22,6 +22,7 @@ module Gitea
include Gitea::Api::User
include Gitea::Api::Organization
include Gitea::Api::Notification
include Gitea::Api::Miscellaneous
end
end # User
end # Gitea

View File

@ -0,0 +1,21 @@
module Gitea
module Api
module Miscellaneous
def post_markdown(opt={})
@http.post("/markdown", opt)
end
def post_markdown_new(opt={})
@http.post("/markdown/new", opt)
end
def get_signing_key_gpg(opt={})
@http.get("/signing-key.gpg", opt)
end
def get_version(opt={})
@http.get("/version", opt)
end
end # Miscellaneous
end # Api
end # Gitea