gitea-client 1.5.9 → 1.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 63c0dfa2a99de01e74f0da89ba2fc8cbfc4ab4cc11f8efcbc970baaa6ff30a99
4
- data.tar.gz: ef27b8f8fe6fd97c24304f003b8eab81c64f571661bfd6854f9daae2a65260aa
3
+ metadata.gz: f73d7bdbddf949f1429f3391a5cb91b055a4fd2a12c46b8e57a0d23d7fa24bea
4
+ data.tar.gz: 7e24b0c22048dd898836642fb6ffa39ae8da59590d3a91fd8bd774b344bd4e6b
5
5
  SHA512:
6
- metadata.gz: 54e47a1f53c192e934e175ffa9d24b9d1fb8cfbebc077bbe324b319e224be2f6cdb90ad282653b4dc2cb0e61b514f24560b325f763cfe1bf9c9838931dee8aac
7
- data.tar.gz: f8d6ab5d9dfc83b97536993d10b29de16f446e0eb89d9953f32e25ab1549287784e3ffac10b7abc3d57e88369341da4715f065721791d5bf2589a0cb18919586
6
+ metadata.gz: 7b0b384ad1bdaca59ba57eec00cb72b574acd99c8e5cf00ccbc232a3520cabcb4ef140fc8ebff42755ebcf144dcab3c13dc1f63197ece0c012c75f4b7da06ffe
7
+ data.tar.gz: f31d595d1688f597c814c1012cc33fa1961f4c30ce09db9bde796bf05423e1eb152f3e7aabce6f0707c76499bd2324e599ed3cf666303acdcfc722db5070042d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitea-client (1.5.9)
4
+ gitea-client (1.6.1)
5
5
  rest-client (~> 2.1.0)
6
6
 
7
7
  GEM
@@ -48,8 +48,8 @@ GEM
48
48
 
49
49
  PLATFORMS
50
50
  -darwin-21
51
- arm64-darwin-21
52
51
  x86_64-darwin-20
52
+ x86_64-linux
53
53
 
54
54
  DEPENDENCIES
55
55
  gitea-client!
@@ -58,4 +58,4 @@ DEPENDENCIES
58
58
  standard
59
59
 
60
60
  BUNDLED WITH
61
- 2.3.26
61
+ 2.4.22
@@ -9,6 +9,34 @@ module Gitea
9
9
  @http.post("/admin/cron/#{task}", opt)
10
10
  end
11
11
 
12
+ def get_admin_emails(opt={})
13
+ @http.get("/admin/emails", opt)
14
+ end
15
+
16
+ def get_admin_emails_search(opt={})
17
+ @http.get("/admin/emails/search", opt)
18
+ end
19
+
20
+ def get_admin_hooks(opt={})
21
+ @http.get("/admin/hooks", opt)
22
+ end
23
+
24
+ def post_admin_hooks(opt={})
25
+ @http.post("/admin/hooks", opt)
26
+ end
27
+
28
+ def get_admin_hooks_by_id(id, opt={})
29
+ @http.get("/admin/hooks/#{id}", opt)
30
+ end
31
+
32
+ def delete_admin_hooks_by_id(id, opt={})
33
+ @http.delete("/admin/hooks/#{id}", opt)
34
+ end
35
+
36
+ def patch_admin_hooks_by_id(id, opt={})
37
+ @http.patch("/admin/hooks/#{id}", opt)
38
+ end
39
+
12
40
  def get_admin_orgs(opt={})
13
41
  @http.get("/admin/orgs", opt)
14
42
  end
@@ -53,6 +81,10 @@ module Gitea
53
81
  @http.post("/admin/users/#{username}/orgs", opt)
54
82
  end
55
83
 
84
+ def post_admin_users_rename_by_username(username, opt={})
85
+ @http.post("/admin/users/#{username}/rename", opt)
86
+ end
87
+
56
88
  def post_admin_users_repos_by_username(username, opt={})
57
89
  @http.post("/admin/users/#{username}/repos", opt)
58
90
  end
@@ -6,7 +6,6 @@ module Gitea
6
6
  def patch_admin_users_by_username(username, opt = {})
7
7
  @http.patch("/admin/users/#{username}", opt)
8
8
  end
9
-
10
9
  end # Admin
11
10
  end # Hat
12
11
  end # Api
@@ -19,18 +19,6 @@ module Gitea
19
19
  @http.post("/repos/#{owner}/#{repo}/actions/runs/#{run}/jobs/#{job}", opt)
20
20
  end
21
21
 
22
- def post_repos_actions_runs_rerun_by_owner_repo_run(owner, repo, run, opt = {})
23
- @http.post("/repos/#{owner}/#{repo}/actions/runs/#{run}/rerun", opt)
24
- end
25
-
26
- def post_repos_actions_runs_jobs_rerun_by_owner_repo_run_job(owner, repo, run, job, opt = {})
27
- @http.post("/repos/#{owner}/#{repo}/actions/runs/#{run}/jobs/#{job}/rerun", opt)
28
- end
29
-
30
- def get_repos_actions_runs_jobs_logs_by_owner_repo_run_job(owner, repo, run, job, opt = {})
31
- @http.get("/repos/#{owner}/#{repo}/actions/runs/#{run}/jobs/#{job}/logs")
32
- end
33
-
34
22
  def post_repos_actions_disable(owner, repo, opt= {})
35
23
  @http.post("/repos/#{owner}/#{repo}/actions/disable", opt)
36
24
  end
@@ -59,6 +47,14 @@ module Gitea
59
47
  @http.get("/repos/#{owner}/#{repo}/commits/#{sha}/diff", opt)
60
48
  end
61
49
 
50
+ def get_repos_commits_files_by_owner_repo_sha(owner, repo, sha, opt={})
51
+ @http.get("/repos/#{owner}/#{repo}/commits/#{sha}/files", opt)
52
+ end
53
+
54
+ def get_repos_commits_files_by_owner_repo_sha_filepath(owner, repo, sha, filepath, opt={})
55
+ @http.get("/repos/#{owner}/#{repo}/commits/#{sha}/files/#{filepath}", opt)
56
+ end
57
+
62
58
  def post_repos_hooks_by_owner_repo(owner, repo, opt = {})
63
59
  @http.post("/repos/#{owner}/#{repo}/hooks", opt)
64
60
  end
@@ -167,6 +163,14 @@ module Gitea
167
163
  @http.get("/repos/#{owner}/#{repo}/compare/#{baseRef}...#{headRef}", opt)
168
164
  end
169
165
 
166
+ def get_repos_compare_files_by_owner_repo_baseref_headref(owner, repo, baseRef, headRef, opt={})
167
+ @http.get("/repos/#{owner}/#{repo}/compare/#{baseRef}...#{headRef}/files", opt)
168
+ end
169
+
170
+ def get_repos_compare_files_by_owner_repo_baseref_headref_filepath(owner, repo, baseRef, headRef, filepath, opt={})
171
+ @http.get("/repos/#{owner}/#{repo}/compare/#{baseRef}...#{headRef}/files/#{filepath}", opt)
172
+ end
173
+
170
174
  def post_repos_transfer_by_owner_repo(owner, repo, opt = {})
171
175
  @http.post("/repos/#{owner}/#{repo}/transfer", opt)
172
176
  end
@@ -183,6 +187,10 @@ module Gitea
183
187
  @http.get("/repos/#{owner}/#{repo}/pulls/#{index}/files", opt)
184
188
  end
185
189
 
190
+ def get_repos_pulls_files_by_owner_repo_index_filepath(owner, repo, index, filepath, opt={})
191
+ @http.get("/repos/#{owner}/#{repo}/pulls/#{index}/files/#{filepath}", opt)
192
+ end
193
+
186
194
  def post_repos_contents_batch_by_owner_repo(owner, repo, opt = {})
187
195
  @http.post("/repos/#{owner}/#{repo}/contents/batch", opt)
188
196
  end
@@ -29,6 +29,26 @@ module Gitea
29
29
  @http.patch("/repos/#{owner}/#{repo}/issues/comments/#{id}", opt)
30
30
  end
31
31
 
32
+ def get_repos_issues_comments_assets_by_owner_repo_id(owner, repo, id, opt={})
33
+ @http.get("/repos/#{owner}/#{repo}/issues/comments/#{id}/assets", opt)
34
+ end
35
+
36
+ def post_repos_issues_comments_assets_by_owner_repo_id(owner, repo, id, opt={})
37
+ @http.post("/repos/#{owner}/#{repo}/issues/comments/#{id}/assets", opt)
38
+ end
39
+
40
+ def get_repos_issues_comments_assets_by_owner_repo_id_attachment_id(owner, repo, id, attachment_id, opt={})
41
+ @http.get("/repos/#{owner}/#{repo}/issues/comments/#{id}/assets/#{attachment_id}", opt)
42
+ end
43
+
44
+ def delete_repos_issues_comments_assets_by_owner_repo_id_attachment_id(owner, repo, id, attachment_id, opt={})
45
+ @http.delete("/repos/#{owner}/#{repo}/issues/comments/#{id}/assets/#{attachment_id}", opt)
46
+ end
47
+
48
+ def patch_repos_issues_comments_assets_by_owner_repo_id_attachment_id(owner, repo, id, attachment_id, opt={})
49
+ @http.patch("/repos/#{owner}/#{repo}/issues/comments/#{id}/assets/#{attachment_id}", opt)
50
+ end
51
+
32
52
  def get_repos_issues_comments_reactions_by_owner_repo_id(owner, repo, id, opt = {})
33
53
  @http.get("/repos/#{owner}/#{repo}/issues/comments/#{id}/reactions", opt)
34
54
  end
@@ -53,6 +73,38 @@ module Gitea
53
73
  @http.patch("/repos/#{owner}/#{repo}/issues/#{index}", opt)
54
74
  end
55
75
 
76
+ def get_repos_issues_assets_by_owner_repo_index(owner, repo, index, opt={})
77
+ @http.get("/repos/#{owner}/#{repo}/issues/#{index}/assets", opt)
78
+ end
79
+
80
+ def post_repos_issues_assets_by_owner_repo_index(owner, repo, index, opt={})
81
+ @http.post("/repos/#{owner}/#{repo}/issues/#{index}/assets", opt)
82
+ end
83
+
84
+ def get_repos_issues_assets_by_owner_repo_index_attachment_id(owner, repo, index, attachment_id, opt={})
85
+ @http.get("/repos/#{owner}/#{repo}/issues/#{index}/assets/#{attachment_id}", opt)
86
+ end
87
+
88
+ def delete_repos_issues_assets_by_owner_repo_index_attachment_id(owner, repo, index, attachment_id, opt={})
89
+ @http.delete("/repos/#{owner}/#{repo}/issues/#{index}/assets/#{attachment_id}", opt)
90
+ end
91
+
92
+ def patch_repos_issues_assets_by_owner_repo_index_attachment_id(owner, repo, index, attachment_id, opt={})
93
+ @http.patch("/repos/#{owner}/#{repo}/issues/#{index}/assets/#{attachment_id}", opt)
94
+ end
95
+
96
+ def get_repos_issues_blocks_by_owner_repo_index(owner, repo, index, opt={})
97
+ @http.get("/repos/#{owner}/#{repo}/issues/#{index}/blocks", opt)
98
+ end
99
+
100
+ def post_repos_issues_blocks_by_owner_repo_index(owner, repo, index, opt={})
101
+ @http.post("/repos/#{owner}/#{repo}/issues/#{index}/blocks", opt)
102
+ end
103
+
104
+ def delete_repos_issues_blocks_by_owner_repo_index(owner, repo, index, opt={})
105
+ @http.delete("/repos/#{owner}/#{repo}/issues/#{index}/blocks", opt)
106
+ end
107
+
56
108
  def get_repos_issues_comments_by_owner_repo_index(owner, repo, index, opt = {})
57
109
  @http.get("/repos/#{owner}/#{repo}/issues/#{index}/comments", opt)
58
110
  end
@@ -65,6 +117,18 @@ module Gitea
65
117
  @http.post("/repos/#{owner}/#{repo}/issues/#{index}/deadline", opt)
66
118
  end
67
119
 
120
+ def get_repos_issues_dependencies_by_owner_repo_index(owner, repo, index, opt={})
121
+ @http.get("/repos/#{owner}/#{repo}/issues/#{index}/dependencies", opt)
122
+ end
123
+
124
+ def post_repos_issues_dependencies_by_owner_repo_index(owner, repo, index, opt={})
125
+ @http.post("/repos/#{owner}/#{repo}/issues/#{index}/dependencies", opt)
126
+ end
127
+
128
+ def delete_repos_issues_dependencies_by_owner_repo_index(owner, repo, index, opt={})
129
+ @http.delete("/repos/#{owner}/#{repo}/issues/#{index}/dependencies", opt)
130
+ end
131
+
68
132
  def get_repos_issues_labels_by_owner_repo_index(owner, repo, index, opt = {})
69
133
  @http.get("/repos/#{owner}/#{repo}/issues/#{index}/labels", opt)
70
134
  end
@@ -85,6 +149,18 @@ module Gitea
85
149
  @http.delete("/repos/#{owner}/#{repo}/issues/#{index}/labels/#{id}", opt)
86
150
  end
87
151
 
152
+ def post_repos_issues_pin_by_owner_repo_index(owner, repo, index, opt={})
153
+ @http.post("/repos/#{owner}/#{repo}/issues/#{index}/pin", opt)
154
+ end
155
+
156
+ def delete_repos_issues_pin_by_owner_repo_index(owner, repo, index, opt={})
157
+ @http.delete("/repos/#{owner}/#{repo}/issues/#{index}/pin", opt)
158
+ end
159
+
160
+ def patch_repos_issues_pin_by_owner_repo_index_position(owner, repo, index, position, opt={})
161
+ @http.patch("/repos/#{owner}/#{repo}/issues/#{index}/pin/#{position}", opt)
162
+ end
163
+
88
164
  def get_repos_issues_reactions_by_owner_repo_index(owner, repo, index, opt = {})
89
165
  @http.get("/repos/#{owner}/#{repo}/issues/#{index}/reactions", opt)
90
166
  end
@@ -1,12 +1,40 @@
1
1
  module Gitea
2
2
  module Api
3
3
  module Miscellaneous
4
+ def get_gitignore_templates(opt={})
5
+ @http.get("/gitignore/templates", opt)
6
+ end
7
+
8
+ def get_gitignore_templates_by_name(name, opt={})
9
+ @http.get("/gitignore/templates/#{name}", opt)
10
+ end
11
+
12
+ def get_label_templates(opt={})
13
+ @http.get("/label/templates", opt)
14
+ end
15
+
16
+ def get_label_templates_by_name(name, opt={})
17
+ @http.get("/label/templates/#{name}", opt)
18
+ end
19
+
20
+ def get_licenses(opt={})
21
+ @http.get("/licenses", opt)
22
+ end
23
+
24
+ def get_licenses_by_name(opt={})
25
+ @http.get("/licenses/#{name}", opt)
26
+ end
27
+
4
28
  def post_markdown(opt={})
5
29
  @http.post("/markdown", opt)
6
30
  end
7
31
 
8
- def post_markdown_new(opt={})
9
- @http.post("/markdown/new", opt)
32
+ def post_markdown_raw(opt={})
33
+ @http.post("/markdown/raw", opt)
34
+ end
35
+
36
+ def post_markup(opt={})
37
+ @http.post("/markup", opt)
10
38
  end
11
39
 
12
40
  def get_nodeinfo(opt = {})
@@ -21,6 +21,30 @@ module Gitea
21
21
  @http.patch("/orgs/#{org}", opt)
22
22
  end
23
23
 
24
+ def get_orgs_actions_secrets_org(org, opt={})
25
+ @http.get("/orgs/#{org}/actions/secrets", opt)
26
+ end
27
+
28
+ def put_orgs_actions_secrets_by_org_secretname(org, secretname, opt={})
29
+ @http.put("/orgs/#{org}/actions/secrets/#{secretname}", opt)
30
+ end
31
+
32
+ def delete_orgs_actions_secrets_by_org_secretname(org, secretname, opt={})
33
+ @http.delete("/orgs/#{org}/actions/secrets/#{secretname}", opt)
34
+ end
35
+
36
+ def get_orgs_activities_feeds_by_org(org, opt={})
37
+ @http.get("/orgs/#{org}/activities/feeds", opt)
38
+ end
39
+
40
+ def post_orgs_avatar_by_org(org, opt={})
41
+ @http.post("/orgs/#{org}/avatar", opt)
42
+ end
43
+
44
+ def delete_orgs_avatar_by_orb(org, opt={})
45
+ @http.delete("/orgs/#{org}/avatar", opt={})
46
+ end
47
+
24
48
  def get_orgs_hooks_by_org(org, opt={})
25
49
  @http.get("/orgs/#{org}/hooks", opt)
26
50
  end
@@ -105,7 +129,7 @@ module Gitea
105
129
  @http.post("/orgs/#{org}/teams", opt)
106
130
  end
107
131
 
108
- def get_orgs_temas_search_by_org(org, opt={})
132
+ def get_orgs_teams_search_by_org(org, opt={})
109
133
  @http.get("/orgs/#{org}/teams/search", opt)
110
134
  end
111
135
 
@@ -121,6 +145,10 @@ module Gitea
121
145
  @http.patch("/teams/#{id}", opt)
122
146
  end
123
147
 
148
+ def get_teams_activities_feeds_by_id(id, opt={})
149
+ @http.get("/teams/#{id}/activities/feeds", opt)
150
+ end
151
+
124
152
  def get_teams_members_by_id(id, opt={})
125
153
  @http.get("/teams/#{id}/members", opt)
126
154
  end
@@ -15,7 +15,7 @@ module Gitea
15
15
  end
16
16
 
17
17
  def get_packages_files_by_owner_type_name_version(owner, type, name, version, opt = {})
18
- @http.get("/packages/#{owner}/#{type}/#{name}/#{version}", opt)
18
+ @http.get("/packages/#{owner}/#{type}/#{name}/#{version}/files", opt)
19
19
  end
20
20
  end # Package
21
21
  end # Api
@@ -21,6 +21,18 @@ module Gitea
21
21
  @http.patch("/repos/#{owner}/#{repo}", opt)
22
22
  end
23
23
 
24
+ def put_repos_actions_secrets_by_owner_repo_secretname(owner, repo, secretname, opt={})
25
+ @http.put("/repos/#{owner}/#{repo}/actions/secrets/#{secretname}", opt)
26
+ end
27
+
28
+ def delete_repos_actions_secrets_by_owner_repo_secretname(owner, repo, secretname, opt={})
29
+ @http.delete("/repos/#{owner}/#{repo}/actions/secrets/#{secretname}", opt)
30
+ end
31
+
32
+ def get_repos_activities_feeds_by_owner_repo(owner, repo, opt={})
33
+ @http.get("/repos/#{owner}/#{repo}/activities/feeds", opt)
34
+ end
35
+
24
36
  def get_repos_archive_by_owner_repo_archive(owner, repo, archive, opt = {})
25
37
  @http.get("/repos/#{owner}/#{repo}/archive/#{archive}")
26
38
  end
@@ -29,6 +41,14 @@ module Gitea
29
41
  @http.get("/repos/#{owner}/#{repo}/assignees", opt)
30
42
  end
31
43
 
44
+ def post_repos_avatar_by_owner_repo(owner, repo, opt={})
45
+ @http.post("/repos/#{owner}/#{repo}/avatar", opt)
46
+ end
47
+
48
+ def delete_repos_avatar_by_owner_repo(owner, repo, opt={})
49
+ @http.delete("/repos/#{owner}/#{repo}/avatar", opt)
50
+ end
51
+
32
52
  def get_repos_branch_protections_by_owner_repo(owner, repo, opt = {})
33
53
  @http.get("/repos/#{owner}/#{repo}/branch_protections", opt)
34
54
  end
@@ -81,10 +101,6 @@ module Gitea
81
101
  @http.delete("/repos/#{owner}/#{repo}/collaborators/#{collaborator}", opt)
82
102
  end
83
103
 
84
- def get_repos_pulls_files_by_owner_repo_index(owner, repo, index, opt = {})
85
- @http.get("/repos/#{owner}/#{repo}/pulls/#{index}/files", opt)
86
- end
87
-
88
104
  def get_repos_collaborators_permission_by_owner_repo_collaborator(owner, repo, collaborator, opt = {})
89
105
  @http.get("/repos/#{owner}/#{repo}/collaborators/#{collaborator}/permission", opt)
90
106
  end
@@ -101,28 +117,12 @@ module Gitea
101
117
  @http.get("/repos/#{owner}/#{repo}/commits/#{ref}/statuses", opt)
102
118
  end
103
119
 
104
- def get_repos_push_mirrors_by_owner_repo(owner, repo, opt = {})
105
- @http.get("/repos/#{owner}/#{repo}/push_mirrors", opt)
106
- end
107
-
108
- def post_repos_push_mirrors_by_owner_repo(owner, repo, opt = {})
109
- @http.post("/repos/#{owner}/#{repo}/push_mirrors", opt)
110
- end
111
-
112
120
  def get_repos_contents_by_owner_repo(owner, repo, opt = {})
113
121
  @http.get("/repos/#{owner}/#{repo}/contents", opt)
114
122
  end
115
123
 
116
- def post_repos_push_mirrors_sync_by_owner_repo(owner, repo, opt = {})
117
- @http.post("/repos/#{owner}/#{repo}/push_mirrors-sync", opt)
118
- end
119
-
120
- def get_repos_push_mirrors_by_owner_repo_name(owner, repo, name, opt = {})
121
- @http.get("/repos/#{owner}/#{repo}/push_mirrors/#{name}", opt)
122
- end
123
-
124
- def delete_repos_push_mirrors_by_owner_repo_name(owner, repo, name, opt = {})
125
- @http.delete("/repos/#{owner}/#{repo}/push_mirrors/#{name}", opt)
124
+ def post_repos_contents_by_owner_repo(owner, repo, opt={})
125
+ @http.post("/repos/#{owner}/#{repo}/contents", opt)
126
126
  end
127
127
 
128
128
  def get_repos_contents_by_owner_repo_filepath(owner, repo, filepath, opt = {})
@@ -229,6 +229,14 @@ module Gitea
229
229
  @http.post("/repos/#{owner}/#{repo}/hooks/#{id}/tests", opt)
230
230
  end
231
231
 
232
+ def get_repos_issue_config_by_owner_repo(owner, repo, opt={})
233
+ @http.get("/repos/#{owner}/#{repo}/issue_config", opt)
234
+ end
235
+
236
+ def get_repos_issue_config_validate_by_owner_repo(owner, repo, opt={})
237
+ @http.get("/repos/#{owner}/#{repo}/issue_config/validate", opt)
238
+ end
239
+
232
240
  def get_repos_issue_templates_by_owner_repo(owner, repo, opt = {})
233
241
  @http.get("/repos/#{owner}/#{repo}/issue_templates", opt)
234
242
  end
@@ -261,6 +269,10 @@ module Gitea
261
269
  @http.post("/repos/#{owner}/#{repo}/mirror-sync", opt)
262
270
  end
263
271
 
272
+ def get_repos_new_pin_allowed_by_owner_repo(owner, repo, opt={})
273
+ @http.get("/repos/#{owner}/#{repo}/new_pin_allowed", opt)
274
+ end
275
+
264
276
  def get_repos_pulls_by_owner_repo(owner, repo, opt = {})
265
277
  @http.get("/repos/#{owner}/#{repo}/pulls", opt)
266
278
  end
@@ -269,6 +281,10 @@ module Gitea
269
281
  @http.post("/repos/#{owner}/#{repo}/pulls", opt)
270
282
  end
271
283
 
284
+ def get_repos_pulls_pinned_by_owner_repo(owner, repo, opt={})
285
+ @http.get("/repos/#{owner}/#{repo}/pulls/pinned", opt)
286
+ end
287
+
272
288
  def patch_repos_pulls_by_owner_repo_index(owner, repo, index, opt = {})
273
289
  @http.patch("/repos/#{owner}/#{repo}/pulls/#{index}", opt)
274
290
  end
@@ -281,6 +297,10 @@ module Gitea
281
297
  @http.get("/repos/#{owner}/#{repo}/pulls/#{index}/commits", opt)
282
298
  end
283
299
 
300
+ def get_repos_pulls_files_by_owner_repo_index(owner, repo, index, opt = {})
301
+ @http.get("/repos/#{owner}/#{repo}/pulls/#{index}/files", opt)
302
+ end
303
+
284
304
  def get_repos_pulls_merge_by_owner_repo_index(owner, repo, index, opt = {})
285
305
  @http.get("/repos/#{owner}/#{repo}/pulls/#{index}/merge", opt)
286
306
  end
@@ -337,6 +357,26 @@ module Gitea
337
357
  @http.post("/repos/#{owner}/#{repo}/pulls/#{index}/update", opt)
338
358
  end
339
359
 
360
+ def get_repos_push_mirrors_by_owner_repo(owner, repo, opt = {})
361
+ @http.get("/repos/#{owner}/#{repo}/push_mirrors", opt)
362
+ end
363
+
364
+ def post_repos_push_mirrors_by_owner_repo(owner, repo, opt = {})
365
+ @http.post("/repos/#{owner}/#{repo}/push_mirrors", opt)
366
+ end
367
+
368
+ def post_repos_push_mirrors_sync_by_owner_repo(owner, repo, opt = {})
369
+ @http.post("/repos/#{owner}/#{repo}/push_mirrors-sync", opt)
370
+ end
371
+
372
+ def get_repos_push_mirrors_by_owner_repo_name(owner, repo, name, opt = {})
373
+ @http.get("/repos/#{owner}/#{repo}/push_mirrors/#{name}", opt)
374
+ end
375
+
376
+ def delete_repos_push_mirrors_by_owner_repo_name(owner, repo, name, opt = {})
377
+ @http.delete("/repos/#{owner}/#{repo}/push_mirrors/#{name}", opt)
378
+ end
379
+
340
380
  def get_repos_raw_by_owner_repo_filepath(owner, repo, filepath, opt = {})
341
381
  @http.get("/repos/#{owner}/#{repo}/raw/#{filepath}", opt)
342
382
  end
@@ -349,6 +389,10 @@ module Gitea
349
389
  @http.post("/repos/#{owner}/#{repo}/releases", opt)
350
390
  end
351
391
 
392
+ def get_repos_releases_latest_by_owner_repo(owner, repo, opt={})
393
+ @http.get("/repos/#{owner}/#{repo}/releases/latest", opt)
394
+ end
395
+
352
396
  def get_repos_releases_tags_by_owner_repo_tag(owner, repo, tag, opt = {})
353
397
  @http.get("/repos/#{owner}/#{repo}/releases/tags/#{tag}", opt)
354
398
  end
@@ -6,6 +6,14 @@ module Gitea
6
6
  @http.get("/user", opt)
7
7
  end
8
8
 
9
+ def put_user_actions_secrets_by_secretname(secretname, opt={})
10
+ @http.put("/user/actions/secrets/#{secretname}", opt)
11
+ end
12
+
13
+ def delete_user_actions_secrets_by_secretname(secretname, opt={})
14
+ @http.delete("/user/actions/secrets/#{secretname}", opt)
15
+ end
16
+
9
17
  def get_user_applications_oauth2(opt={})
10
18
  @http.get("/user/applications/oauth2", opt)
11
19
  end
@@ -26,6 +34,14 @@ module Gitea
26
34
  @http.patch("/user/applications/oauth2/#{id}", opt)
27
35
  end
28
36
 
37
+ def post_user_avatar(opt={})
38
+ @http.post("/user/avatar", opt)
39
+ end
40
+
41
+ def delete_user_avatar(opt={})
42
+ @http.delete("/user/avatar", opt)
43
+ end
44
+
29
45
  def get_user_emails(opt={})
30
46
  @http.get("/user/emails", opt)
31
47
  end
@@ -82,6 +98,26 @@ module Gitea
82
98
  @http.delete("/user/gpg_keys/#{id}", opt)
83
99
  end
84
100
 
101
+ def get_user_hooks(opt={})
102
+ @http.get("/user/hooks", opt)
103
+ end
104
+
105
+ def post_user_hooks(opt={})
106
+ @http.post("/user/hooks", opt)
107
+ end
108
+
109
+ def get_user_hooks_by_id(id, opt={})
110
+ @http.get("/user/hooks/#{id}", opt)
111
+ end
112
+
113
+ def delete_user_hooks_by_id(id, opt={})
114
+ @http.delete("/user/hooks/#{id}", opt)
115
+ end
116
+
117
+ def patch_user_hooks_by_id(id, opt={})
118
+ @http.patch("/user/hooks/#{id}", opt)
119
+ end
120
+
85
121
  def get_user_keys(opt={})
86
122
  @http.get("/user/keys", opt)
87
123
  end
@@ -102,6 +138,10 @@ module Gitea
102
138
  @http.get("/user/repos", opt)
103
139
  end
104
140
 
141
+ def post_user_repos(opt={})
142
+ @http.post("/user/repos", opt)
143
+ end
144
+
105
145
  def get_user_settings(opt={})
106
146
  @http.get("/user/settings", opt)
107
147
  end
@@ -150,8 +190,8 @@ module Gitea
150
190
  @http.get("/users/#{username}", opt)
151
191
  end
152
192
 
153
- def get_users_following_by_follower_followee(follower, followee, opt={})
154
- @http.get("/users/#{follower}/following/#{followee}", opt)
193
+ def get_users_activities_feeds_by_username(username, opt={})
194
+ @http.get("/users/#{username}/activities/feeds", opt)
155
195
  end
156
196
 
157
197
  def get_users_followers_by_username(username, opt={})
@@ -159,7 +199,11 @@ module Gitea
159
199
  end
160
200
 
161
201
  def get_users_following_by_username(username, opt={})
162
- @http.get("/user/#{username}/following", opt)
202
+ @http.get("/users/#{username}/following", opt)
203
+ end
204
+
205
+ def get_users_following_by_username_target(username, target, opt={})
206
+ @http.get("/users/#{username}/following/#{target}", opt)
163
207
  end
164
208
 
165
209
  def get_users_gpg_keys_by_username(username, opt={})
data/lib/gitea/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Gitea
4
- VERSION = "1.5.9"
4
+ VERSION = "1.6.1"
5
5
  end
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: 1.5.9
4
+ version: 1.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - viletyy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-07-22 00:00:00.000000000 Z
11
+ date: 2024-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
92
  - !ruby/object:Gem::Version
93
93
  version: '0'
94
94
  requirements: []
95
- rubygems_version: 3.4.10
95
+ rubygems_version: 3.0.9
96
96
  signing_key:
97
97
  specification_version: 4
98
98
  summary: Gitea API 库