diff --git a/lib/gitea/api.rb b/lib/gitea/api.rb index 7da5aab..8f0e6c6 100644 --- a/lib/gitea/api.rb +++ b/lib/gitea/api.rb @@ -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' diff --git a/lib/gitea/api/activity.rb b/lib/gitea/api/activity.rb new file mode 100644 index 0000000..eb94d77 --- /dev/null +++ b/lib/gitea/api/activity.rb @@ -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 \ No newline at end of file diff --git a/lib/gitea/api/client.rb b/lib/gitea/api/client.rb index f6af8a8..832224a 100644 --- a/lib/gitea/api/client.rb +++ b/lib/gitea/api/client.rb @@ -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 \ No newline at end of file diff --git a/lib/gitea/api/repository.rb b/lib/gitea/api/repository.rb index f70761f..38863d3 100644 --- a/lib/gitea/api/repository.rb +++ b/lib/gitea/api/repository.rb @@ -29,6 +29,10 @@ module Gitea @http.get("/repos/#{owner}/#{repo}/assignees", 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 @@ -61,6 +65,10 @@ module Gitea @http.get("/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_by_owner_repo_branch(owner, repo, branch, opt = {}) @http.get("/repos/#{owner}/#{repo}/branches/#{branch}", opt) end @@ -93,6 +101,10 @@ 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