Compare commits
33 Commits
Author | SHA1 | Date |
---|---|---|
viletyy | abc40199dc | |
viletyy | c4323b1b39 | |
viletyy | a94d56a377 | |
viletyy | 9d6780719d | |
viletyy | 0c5724684c | |
viletyy | dd693d62b2 | |
viletyy | cdfc53f2b2 | |
viletyy | d3440e67ce | |
viletyy | bdc52229c5 | |
viletyy | 64275e530f | |
viletyy | ea2d48fa20 | |
viletyy | b7e01f1076 | |
viletyy | 41c2538e9c | |
viletyy | 6978f97dbd | |
viletyy | 5de47dcde9 | |
viletyy | 515219d3b1 | |
viletyy | 0fc23e2e1f | |
viletyy | 55a5935de2 | |
viletyy | dca8344faa | |
viletyy | 8dedf60442 | |
viletyy | 1ec1dd8a5f | |
viletyy | 625474f044 | |
viletyy | db67771b84 | |
viletyy | 107432be54 | |
viletyy | d5fbd50438 | |
viletyy | dd226bb64b | |
viletyy | 409036d97c | |
viletyy | 67ac9e44e4 | |
viletyy | 7513b641e4 | |
viletyy | b933f38a39 | |
viletyy | 93ddc013f2 | |
viletyy | b2b9c46b1e | |
viletyy | 26cb66b2ba |
|
@ -1,7 +1,7 @@
|
|||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
gitea-client (0.10.0)
|
||||
gitea-client (0.10.5)
|
||||
rest-client (~> 2.1.0)
|
||||
|
||||
GEM
|
||||
|
|
|
@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|||
spec.description = ""
|
||||
spec.homepage = "https://github.com/viletyy/gitea-client"
|
||||
spec.license = "MIT"
|
||||
spec.required_ruby_version = ">= 2.6.0"
|
||||
spec.required_ruby_version = ">= 2.4.0"
|
||||
|
||||
spec.metadata["homepage_uri"] = spec.homepage
|
||||
spec.metadata["source_code_uri"] = "https://github.com/viletyy/gitea-client"
|
||||
|
|
|
@ -7,6 +7,7 @@ require_relative 'api/organization'
|
|||
require_relative 'api/notification'
|
||||
require_relative 'api/miscellaneous'
|
||||
require_relative 'api/admin'
|
||||
require_relative 'api/activity'
|
||||
require_relative 'api/client'
|
||||
require_relative 'api/config'
|
||||
require_relative 'api/exception'
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
module Gitea
|
||||
module Api
|
||||
module Activity
|
||||
def get_activity(opt={})
|
||||
@http.get("/activity", opt)
|
||||
end
|
||||
|
||||
def get_activity_develop(opt={})
|
||||
@http.get("/activity/develop", opt)
|
||||
end
|
||||
|
||||
def get_activity_project(opt={})
|
||||
@http.get("/activity/project", opt)
|
||||
end
|
||||
end # Activity
|
||||
end # Api
|
||||
end # Gitea
|
|
@ -44,6 +44,7 @@ module Gitea
|
|||
include Gitea::Api::Notification
|
||||
include Gitea::Api::Miscellaneous
|
||||
include Gitea::Api::Admin
|
||||
include Gitea::Api::Activity
|
||||
end
|
||||
end # User
|
||||
end # Gitea
|
|
@ -29,6 +29,15 @@ module Gitea
|
|||
@http.get("/repos/#{owner}/#{repo}/assignees", opt)
|
||||
end
|
||||
|
||||
# get repository blame
|
||||
def get_repos_blame_by_owner_repo(owner, repo, opt = {})
|
||||
@http.get("/repos/#{owner}/#{repo}/blame", opt)
|
||||
end
|
||||
|
||||
def get_repos_branch_name_set_by_owner_repo(owner, repo, opt = {})
|
||||
@http.get("/repos/#{owner}/#{repo}/branch_name_set", opt)
|
||||
end
|
||||
|
||||
def get_repos_branch_protections_by_owner_repo(owner, repo, opt = {})
|
||||
@http.get("/repos/#{owner}/#{repo}/branch_protections", opt)
|
||||
end
|
||||
|
@ -49,6 +58,10 @@ module Gitea
|
|||
@http.patch("/repos/#{owner}/#{repo}/branch_protections/#{name}", opt)
|
||||
end
|
||||
|
||||
def get_repos_branch_tag_count_by_owner_repo(owner, repo, opt={})
|
||||
@http.get("/repos/#{owner}/#{repo}/branch_tag_count", opt)
|
||||
end
|
||||
|
||||
def get_repos_branches_by_owner_repo(owner, repo, opt = {})
|
||||
@http.get("/repos/#{owner}/#{repo}/branches", opt)
|
||||
end
|
||||
|
@ -57,6 +70,14 @@ module Gitea
|
|||
@http.post("/repos/#{owner}/#{repo}/branches", opt)
|
||||
end
|
||||
|
||||
def get_repos_branches_branches_slice_by_owner_repo(owner, repo, opt = {})
|
||||
@http.get("/repos/#{owner}/#{repo}/branches/branches_slice", opt)
|
||||
end
|
||||
|
||||
def get_repos_branches_branches_slice_by_owner_repo(owner, repo, opt = {})
|
||||
@http.get("/repos/#{owner}/#{repo}/branches/branches_slice", opt)
|
||||
end
|
||||
|
||||
def get_repos_branches_by_owner_repo_branch(owner, repo, branch, opt = {})
|
||||
@http.get("/repos/#{owner}/#{repo}/branches/#{branch}", opt)
|
||||
end
|
||||
|
@ -65,6 +86,10 @@ module Gitea
|
|||
@http.delete("/repos/#{owner}/#{repo}/branches/#{branch}", opt)
|
||||
end
|
||||
|
||||
def get_repos_compare_by_owner_repo_from_to(owner, repo, from, to, opt = {})
|
||||
@http.get("/repos/#{owner}/#{repo}/compare/#{to}...#{from}", opt)
|
||||
end
|
||||
|
||||
def get_repos_collaborators_by_owner_repo_collaborator(owner, repo, collaborator, opt = {})
|
||||
@http.get("/repos/#{owner}/#{repo}/collaborators/#{collaborator}", opt)
|
||||
end
|
||||
|
@ -81,6 +106,10 @@ module Gitea
|
|||
@http.get("/repos/#{owner}/#{repo}/commits", opt)
|
||||
end
|
||||
|
||||
def get_repos_commits_diff_by_owner_repo_sha(owner, repo, sha, opt = {})
|
||||
@http.get("/repos/#{owner}/#{repo}/commits/#{sha}/diff", opt)
|
||||
end
|
||||
|
||||
def get_repos_commits_status_by_owner_repo_ref(owner, repo, ref, opt = {})
|
||||
@http.get("/repos/#{owner}/#{repo}/commits/#{ref}/status", opt)
|
||||
end
|
||||
|
@ -89,10 +118,18 @@ module Gitea
|
|||
@http.get("/repos/#{owner}/#{repo}/commits/#{ref}/statuses", opt)
|
||||
end
|
||||
|
||||
def get_repos_commits_slice_by_owner_repo(owner, repo, opt = {})
|
||||
@http.get("/repos/#{owner}/#{repo}/commits_slice", opt)
|
||||
end
|
||||
|
||||
def get_repos_contents_by_owner_repo(owner, repo, opt = {})
|
||||
@http.get("/repos/#{owner}/#{repo}/contents", opt)
|
||||
end
|
||||
|
||||
def post_repos_contents_batch_by_owner_repo(owner, repo, opt = {})
|
||||
@http.post("/repos/#{owner}/#{repo}/contents/batch", opt)
|
||||
end
|
||||
|
||||
def get_repos_contents_by_owner_repo_filepath(owner, repo, filepath, opt = {})
|
||||
@http.get("/repos/#{owner}/#{repo}/contents/#{filepath}", opt)
|
||||
end
|
||||
|
@ -109,10 +146,26 @@ module Gitea
|
|||
@http.delete("/repos/#{owner}/#{repo}/contents/#{filepath}", opt)
|
||||
end
|
||||
|
||||
def get_repos_contributors_by_owner_repo(owner, repo, opt={})
|
||||
@http.get("/repos/#{owner}/#{repo}/contributors", opt)
|
||||
end
|
||||
|
||||
def get_repos_count_by_owner_repo(owner, repo, opt={})
|
||||
@http.get("/repos/#{owner}/#{repo}/count", opt)
|
||||
end
|
||||
|
||||
def get_repos_editorconfig_by_owner_repo_filepath(owner, repo, filepath, opt = {})
|
||||
@http.get("/repos/#{owner}/#{repo}/editorconfig/#{filepath}", opt)
|
||||
end
|
||||
|
||||
def get_repos_file_commits_by_owner_repo_filepath(owner, repo, filepath, opt={})
|
||||
@http.get("/repos/#{owner}/#{repo}/file_commits/#{filepath}", opt)
|
||||
end
|
||||
|
||||
def get_repos_find_by_owner_repo_filepath(owner, repo, filepath, opt={})
|
||||
@http.get("/repos/#{owner}/#{repo}/find", opt)
|
||||
end
|
||||
|
||||
def get_repos_forks_by_owner_repo(owner, repo, opt = {})
|
||||
@http.get("/repos/#{owner}/#{repo}/forks", opt)
|
||||
end
|
||||
|
@ -181,6 +234,10 @@ module Gitea
|
|||
@http.patch("/repos/#{owner}/#{repo}/hooks/#{id}", opt)
|
||||
end
|
||||
|
||||
def get_repos_hooks_hooktasks_by_owner_repo_id(owner, repo, id, opt={})
|
||||
@http.get("/repos/#{owner}/#{repo}/hooks/#{id}/hooktasks", opt)
|
||||
end
|
||||
|
||||
def post_repos_hooks_tests_by_owner_repo_id(owner, repo, id, opt = {})
|
||||
@http.post("/repos/#{owner}/#{repo}/hooks/#{id}/tests", opt)
|
||||
end
|
||||
|
@ -221,6 +278,10 @@ module Gitea
|
|||
@http.post("/repos/#{owner}/#{repo}/pulls", opt)
|
||||
end
|
||||
|
||||
def get_repos_pulls_by_owner_repo_index(owner, repo, index, opt = {})
|
||||
@http.get("/repos/#{owner}/#{repo}/pulls/#{index}", opt)
|
||||
end
|
||||
|
||||
def patch_repos_pulls_by_owner_repo_index(owner, repo, index, opt = {})
|
||||
@http.patch("/repos/#{owner}/#{repo}/pulls/#{index}", opt)
|
||||
end
|
||||
|
@ -281,10 +342,26 @@ module Gitea
|
|||
@http.post("/repos/#{owner}/#{repo}/pulls/#{index}/update", opt)
|
||||
end
|
||||
|
||||
def get_repos_pulls_versions_by_owner_repo_index(owner, repo, index, opt = {})
|
||||
@http.get("/repos/#{owner}/#{repo}/pulls/#{index}/versions", opt)
|
||||
end
|
||||
|
||||
def get_repos_pulls_versions_diff_by_owner_repo_index_version_id(owner, repo, index, version_id, opt={})
|
||||
@http.get("/repos/#{owner}/#{repo}/pulls/#{index}/versions/#{version_id}/diff", opt)
|
||||
end
|
||||
|
||||
def get_repos_raw_by_owner_repo_filepath(owner, repo, filepath, opt = {})
|
||||
@http.get("/repos/#{owner}/#{repo}/raw/#{filepath}", opt)
|
||||
end
|
||||
|
||||
def get_repos_readme_by_owner_repo(owner, repo, opt={})
|
||||
@http.get("/repos/#{owner}/#{repo}/readme", opt)
|
||||
end
|
||||
|
||||
def get_repos_readme_by_owner_repo_dir(owner, repo, dir, opt={})
|
||||
@http.get("/repos/#{owner}/#{repo}/readme/#{dir}", opt)
|
||||
end
|
||||
|
||||
def get_repos_releases_by_owner_repo(owner, repo, opt = {})
|
||||
@http.get("/repos/#{owner}/#{repo}/releases", opt)
|
||||
end
|
||||
|
|
|
@ -166,6 +166,10 @@ module Gitea
|
|||
@http.get("/user/#{username}/gpg_keys", opt)
|
||||
end
|
||||
|
||||
def get_users_heatmap_by_username(username, opt={})
|
||||
@http.get("/users/#{username}/heatmap", opt)
|
||||
end
|
||||
|
||||
def get_users_keys_by_username(username, opt={})
|
||||
@http.get("/user/#{username}/keys", opt)
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitea
|
||||
VERSION = "0.10.0"
|
||||
VERSION = "0.10.5"
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue