gitea-client 0.9.0 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/gitea-client.gemspec +1 -1
- data/lib/gitea/api/activity.rb +17 -0
- data/lib/gitea/api/client.rb +1 -0
- data/lib/gitea/api/repository.rb +64 -0
- data/lib/gitea/api/user.rb +4 -0
- data/lib/gitea/api.rb +1 -0
- data/lib/gitea/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d471a346d3d389a65861191bf7506b70edbd2bf3b79ddbf7a4ba16bf1bc297ab
|
4
|
+
data.tar.gz: bfa1291afc5ed8c5e2f0fefb956bd47590d96d0c4c112df767f86ba5a22737e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bdd6c0aa87717e161764c641937bd9e4f77cf416d5eb123f935135d167eb07124fe8fce766fdd84802d5d4262cf7aad810491adb17578ba43a41cbc4c7f78e69
|
7
|
+
data.tar.gz: 22ae15003fd423b80a521e1051c764c4e20c4d56fca8ce5d6d373cf0c937b8263d52d233da6804d5feed929cdfec620ba59702137b3674d31f6120d6f4ba1391
|
data/Gemfile.lock
CHANGED
data/gitea-client.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.description = ""
|
13
13
|
spec.homepage = "https://github.com/viletyy/gitea-client"
|
14
14
|
spec.license = "MIT"
|
15
|
-
spec.required_ruby_version = ">= 2.
|
15
|
+
spec.required_ruby_version = ">= 2.4.0"
|
16
16
|
|
17
17
|
spec.metadata["homepage_uri"] = spec.homepage
|
18
18
|
spec.metadata["source_code_uri"] = "https://github.com/viletyy/gitea-client"
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Gitea
|
2
|
+
module Api
|
3
|
+
module Activity
|
4
|
+
def get_activity(opt={})
|
5
|
+
@http.get("/activity", opt)
|
6
|
+
end
|
7
|
+
|
8
|
+
def get_activity_develop(opt={})
|
9
|
+
@http.get("/activity/develop", opt)
|
10
|
+
end
|
11
|
+
|
12
|
+
def get_activity_project(opt={})
|
13
|
+
@http.get("/activity/project", opt)
|
14
|
+
end
|
15
|
+
end # Activity
|
16
|
+
end # Api
|
17
|
+
end # Gitea
|
data/lib/gitea/api/client.rb
CHANGED
data/lib/gitea/api/repository.rb
CHANGED
@@ -29,6 +29,14 @@ module Gitea
|
|
29
29
|
@http.get("/repos/#{owner}/#{repo}/assignees", opt)
|
30
30
|
end
|
31
31
|
|
32
|
+
def get_repos_blame_by_owner_repo(owner, repo, opt = {})
|
33
|
+
@http.get("/repos/#{owner}/#{repo}/blame", opt)
|
34
|
+
end
|
35
|
+
|
36
|
+
def get_repos_branch_name_set_by_owner_repo(owner, repo, opt = {})
|
37
|
+
@http.get("/repos/#{owner}/#{repo}/branch_name_set", opt)
|
38
|
+
end
|
39
|
+
|
32
40
|
def get_repos_branch_protections_by_owner_repo(owner, repo, opt = {})
|
33
41
|
@http.get("/repos/#{owner}/#{repo}/branch_protections", opt)
|
34
42
|
end
|
@@ -49,6 +57,10 @@ module Gitea
|
|
49
57
|
@http.patch("/repos/#{owner}/#{repo}/branch_protections/#{name}", opt)
|
50
58
|
end
|
51
59
|
|
60
|
+
def get_repos_branch_tag_count_by_owner_repo(owner, repo, opt={})
|
61
|
+
@http.get("/repos/#{owner}/#{repo}/branch_tag_count", opt)
|
62
|
+
end
|
63
|
+
|
52
64
|
def get_repos_branches_by_owner_repo(owner, repo, opt = {})
|
53
65
|
@http.get("/repos/#{owner}/#{repo}/branches", opt)
|
54
66
|
end
|
@@ -57,6 +69,14 @@ module Gitea
|
|
57
69
|
@http.post("/repos/#{owner}/#{repo}/branches", opt)
|
58
70
|
end
|
59
71
|
|
72
|
+
def get_repos_branches_branches_slice_by_owner_repo(owner, repo, opt = {})
|
73
|
+
@http.get("/repos/#{owner}/#{repo}/branches/branches_slice", opt)
|
74
|
+
end
|
75
|
+
|
76
|
+
def get_repos_branches_branches_slice_by_owner_repo(owner, repo, opt = {})
|
77
|
+
@http.get("/repos/#{owner}/#{repo}/branches/branches_slice", opt)
|
78
|
+
end
|
79
|
+
|
60
80
|
def get_repos_branches_by_owner_repo_branch(owner, repo, branch, opt = {})
|
61
81
|
@http.get("/repos/#{owner}/#{repo}/branches/#{branch}", opt)
|
62
82
|
end
|
@@ -81,6 +101,10 @@ module Gitea
|
|
81
101
|
@http.get("/repos/#{owner}/#{repo}/commits", opt)
|
82
102
|
end
|
83
103
|
|
104
|
+
def get_repos_commits_diff_by_owner_repo_sha(owner, repo, sha, opt = {})
|
105
|
+
@http.get("/repos/#{owner}/#{repo}/commits/#{sha}/diff", opt)
|
106
|
+
end
|
107
|
+
|
84
108
|
def get_repos_commits_status_by_owner_repo_ref(owner, repo, ref, opt = {})
|
85
109
|
@http.get("/repos/#{owner}/#{repo}/commits/#{ref}/status", opt)
|
86
110
|
end
|
@@ -89,10 +113,18 @@ module Gitea
|
|
89
113
|
@http.get("/repos/#{owner}/#{repo}/commits/#{ref}/statuses", opt)
|
90
114
|
end
|
91
115
|
|
116
|
+
def get_repos_commits_slice_by_owner_repo(owner, repo, opt = {})
|
117
|
+
@http.get("/repos/#{owner}/#{repo}/commits_slice", opt)
|
118
|
+
end
|
119
|
+
|
92
120
|
def get_repos_contents_by_owner_repo(owner, repo, opt = {})
|
93
121
|
@http.get("/repos/#{owner}/#{repo}/contents", opt)
|
94
122
|
end
|
95
123
|
|
124
|
+
def post_repos_contents_batch_by_owner_repo(owner, repo, opt = {})
|
125
|
+
@http.post("/repos/#{owner}/#{repo}/contents/batch", opt)
|
126
|
+
end
|
127
|
+
|
96
128
|
def get_repos_contents_by_owner_repo_filepath(owner, repo, filepath, opt = {})
|
97
129
|
@http.get("/repos/#{owner}/#{repo}/contents/#{filepath}", opt)
|
98
130
|
end
|
@@ -109,10 +141,26 @@ module Gitea
|
|
109
141
|
@http.delete("/repos/#{owner}/#{repo}/contents/#{filepath}", opt)
|
110
142
|
end
|
111
143
|
|
144
|
+
def get_repos_contributors_by_owner_repo(owner, repo, opt={})
|
145
|
+
@http.get("/repos/#{owner}/#{repo}/contributors", opt)
|
146
|
+
end
|
147
|
+
|
148
|
+
def get_repos_count_by_owner_repo(owner, repo, opt={})
|
149
|
+
@http.get("/repos/#{owner}/#{repo}/count", opt)
|
150
|
+
end
|
151
|
+
|
112
152
|
def get_repos_editorconfig_by_owner_repo_filepath(owner, repo, filepath, opt = {})
|
113
153
|
@http.get("/repos/#{owner}/#{repo}/editorconfig/#{filepath}", opt)
|
114
154
|
end
|
115
155
|
|
156
|
+
def get_repos_file_commits_by_owner_repo_filepath(owner, repo, filepath, opt={})
|
157
|
+
@http.get("/repos/#{owner}/#{repo}/file_commits/#{filepath}", opt)
|
158
|
+
end
|
159
|
+
|
160
|
+
def get_repos_find_by_owner_repo_filepath(owner, repo, filepath, opt={})
|
161
|
+
@http.get("/repos/#{owner}/#{repo}/find", opt)
|
162
|
+
end
|
163
|
+
|
116
164
|
def get_repos_forks_by_owner_repo(owner, repo, opt = {})
|
117
165
|
@http.get("/repos/#{owner}/#{repo}/forks", opt)
|
118
166
|
end
|
@@ -181,6 +229,10 @@ module Gitea
|
|
181
229
|
@http.patch("/repos/#{owner}/#{repo}/hooks/#{id}", opt)
|
182
230
|
end
|
183
231
|
|
232
|
+
def get_repos_hooks_hooktasks_by_owner_repo_id(owner, repo, id, opt={})
|
233
|
+
@http.get("/repos/#{owner}/#{repo}/hooks/#{id}/hooktasks", opt)
|
234
|
+
end
|
235
|
+
|
184
236
|
def post_repos_hooks_tests_by_owner_repo_id(owner, repo, id, opt = {})
|
185
237
|
@http.post("/repos/#{owner}/#{repo}/hooks/#{id}/tests", opt)
|
186
238
|
end
|
@@ -221,6 +273,10 @@ module Gitea
|
|
221
273
|
@http.post("/repos/#{owner}/#{repo}/pulls", opt)
|
222
274
|
end
|
223
275
|
|
276
|
+
def get_repos_pulls_by_owner_repo_index(owner, repo, opt = {})
|
277
|
+
@http.get("/repos/#{owner}/#{repo}/pulls/#{index}", opt)
|
278
|
+
end
|
279
|
+
|
224
280
|
def patch_repos_pulls_by_owner_repo_index(owner, repo, index, opt = {})
|
225
281
|
@http.patch("/repos/#{owner}/#{repo}/pulls/#{index}", opt)
|
226
282
|
end
|
@@ -285,6 +341,14 @@ module Gitea
|
|
285
341
|
@http.get("/repos/#{owner}/#{repo}/raw/#{filepath}", opt)
|
286
342
|
end
|
287
343
|
|
344
|
+
def get_repos_readme_by_owner_repo(owner, repo, opt={})
|
345
|
+
@http.get("/repos/#{owner}/#{repo}/readme", opt)
|
346
|
+
end
|
347
|
+
|
348
|
+
def get_repos_readme_by_owner_repo_dir(owner, repo, dir, opt={})
|
349
|
+
@http.get("/repos/#{owner}/#{repo}/readme/#{dir}", opt)
|
350
|
+
end
|
351
|
+
|
288
352
|
def get_repos_releases_by_owner_repo(owner, repo, opt = {})
|
289
353
|
@http.get("/repos/#{owner}/#{repo}/releases", opt)
|
290
354
|
end
|
data/lib/gitea/api/user.rb
CHANGED
@@ -166,6 +166,10 @@ module Gitea
|
|
166
166
|
@http.get("/user/#{username}/gpg_keys", opt)
|
167
167
|
end
|
168
168
|
|
169
|
+
def get_users_heatmap_by_username(username, opt={})
|
170
|
+
@http.get("/users/#{username}/heatmap", opt)
|
171
|
+
end
|
172
|
+
|
169
173
|
def get_users_keys_by_username(username, opt={})
|
170
174
|
@http.get("/user/#{username}/keys", opt)
|
171
175
|
end
|
data/lib/gitea/api.rb
CHANGED
@@ -7,6 +7,7 @@ require_relative 'api/organization'
|
|
7
7
|
require_relative 'api/notification'
|
8
8
|
require_relative 'api/miscellaneous'
|
9
9
|
require_relative 'api/admin'
|
10
|
+
require_relative 'api/activity'
|
10
11
|
require_relative 'api/client'
|
11
12
|
require_relative 'api/config'
|
12
13
|
require_relative 'api/exception'
|
data/lib/gitea/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitea-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- viletyy
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-07-
|
11
|
+
date: 2022-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -44,6 +44,7 @@ files:
|
|
44
44
|
- gitea-client.gemspec
|
45
45
|
- lib/gitea-client.rb
|
46
46
|
- lib/gitea/api.rb
|
47
|
+
- lib/gitea/api/activity.rb
|
47
48
|
- lib/gitea/api/admin.rb
|
48
49
|
- lib/gitea/api/client.rb
|
49
50
|
- lib/gitea/api/config.rb
|
@@ -76,7 +77,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
76
77
|
requirements:
|
77
78
|
- - ">="
|
78
79
|
- !ruby/object:Gem::Version
|
79
|
-
version: 2.
|
80
|
+
version: 2.4.0
|
80
81
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
81
82
|
requirements:
|
82
83
|
- - ">="
|