gitea-client 0.8.0 → 0.8.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: 5f940ef48dd56c5ab28738720b797684e95456d751340c87cdd1ec0c2458660f
4
- data.tar.gz: 90a8175b27a667047220b8f7a1d4fa95f7198a2f4032c8235cab0723aaa8f27c
3
+ metadata.gz: a01f550ea5386da4487deb12c7cba34036584176cec9112187ceb0b7086bd4d0
4
+ data.tar.gz: e121287067cdd78713d88bc40f30abc892667708dad5a988c055f98734f9152a
5
5
  SHA512:
6
- metadata.gz: eff8e4121964f07831277221e86b2b9b6340220d81948350298889cad5a73baaf0d18e1acc9efeff67b7ea71ef9d6e5eda9fa9c306cc904621f0650c9d5cb13e
7
- data.tar.gz: 1df9ecf2fdf4f0b01393dc8a778dfb9d4d7e36ec84ecb28c03ef140cce93604538f36ec920d63107fe744b75108a00b3a7d9edeac43f89b5dac5400306059a2f
6
+ metadata.gz: 340bee8032af5963dbef9a35972d64e2e6f29e1d7c4872081aa910e0fb4759b8cfda783b6fbcf8074164c76376157273792666be031e89e35870ea73a5052a0c
7
+ data.tar.gz: 751a80f76fc107ab635ffe91eb7773d92a20d935da0aaa468ffc88fc46698c599eec0d309ee3515d0c831ba0eef3fbb1a54786b236283e20093d498c8e5cf4fe
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitea-client (0.8.0)
4
+ gitea-client (0.8.1)
5
5
  rest-client (~> 2.1.0)
6
6
 
7
7
  GEM
@@ -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
@@ -44,6 +44,7 @@ module Gitea
44
44
  include Gitea::Api::Notification
45
45
  include Gitea::Api::Miscellaneous
46
46
  include Gitea::Api::Admin
47
+ include Gitea::Api::Activity
47
48
  end
48
49
  end # User
49
50
  end # Gitea
@@ -29,6 +29,10 @@ module Gitea
29
29
  @http.get("/repos/#{owner}/#{repo}/assignees", opt)
30
30
  end
31
31
 
32
+ def get_repos_branch_name_set_by_owner_repo(owner, repo, opt = {})
33
+ @http.get("/repos/#{owner}/#{repo}/branch_name_set", opt)
34
+ end
35
+
32
36
  def get_repos_branch_protections_by_owner_repo(owner, repo, opt = {})
33
37
  @http.get("/repos/#{owner}/#{repo}/branch_protections", opt)
34
38
  end
@@ -49,6 +53,10 @@ module Gitea
49
53
  @http.patch("/repos/#{owner}/#{repo}/branch_protections/#{name}", opt)
50
54
  end
51
55
 
56
+ def get_repos_branch_tag_count_by_owner_repo(owner, repo, opt={})
57
+ @http.get("/repos/#{owner}/#{repo}/branch_tag_count", opt)
58
+ end
59
+
52
60
  def get_repos_branches_by_owner_repo(owner, repo, opt = {})
53
61
  @http.get("/repos/#{owner}/#{repo}/branches", opt)
54
62
  end
@@ -57,6 +65,10 @@ module Gitea
57
65
  @http.get("/repos/#{owner}/#{repo}/branches", opt)
58
66
  end
59
67
 
68
+ def get_repos_branches_branches_slice_by_owner_repo(owner, repo, opt = {})
69
+ @http.get("/repos/#{owner}/#{repo}/branches/branches_slice", opt)
70
+ end
71
+
60
72
  def get_repos_branches_by_owner_repo_branch(owner, repo, branch, opt = {})
61
73
  @http.get("/repos/#{owner}/#{repo}/branches/#{branch}", opt)
62
74
  end
@@ -89,6 +101,10 @@ module Gitea
89
101
  @http.get("/repos/#{owner}/#{repo}/commits/#{ref}/statuses", opt)
90
102
  end
91
103
 
104
+ def get_repos_commits_slice_by_owner_repo(owner, repo, opt = {})
105
+ @http.get("/repos/#{owner}/#{repo}/commits_slice", opt)
106
+ end
107
+
92
108
  def get_repos_contents_by_owner_repo(owner, repo, opt = {})
93
109
  @http.get("/repos/#{owner}/#{repo}/contents", opt)
94
110
  end
@@ -109,10 +125,26 @@ module Gitea
109
125
  @http.delete("/repos/#{owner}/#{repo}/contents/#{filepath}", opt)
110
126
  end
111
127
 
128
+ def get_repos_contributors_by_owner_repo(owner, repo, opt={})
129
+ @http.get("/repos/#{owner}/#{repo}/contributors", opt)
130
+ end
131
+
132
+ def get_repos_count_by_owner_repo(owner, repo, opt={})
133
+ @http.get("/repos/#{owner}/#{repo}/count", opt)
134
+ end
135
+
112
136
  def get_repos_editorconfig_by_owner_repo_filepath(owner, repo, filepath, opt = {})
113
137
  @http.get("/repos/#{owner}/#{repo}/editorconfig/#{filepath}", opt)
114
138
  end
115
139
 
140
+ def get_repos_file_commits_by_owner_repo_filepath(owner, repo, filepath, opt={})
141
+ @http.get("/repos/#{owner}/#{repo}/file_commits/#{filepath}", opt)
142
+ end
143
+
144
+ def get_repos_find_by_owner_repo_filepath(owner, repo, filepath, opt={})
145
+ @http.get("/repos/#{owner}/#{repo}/find", opt)
146
+ end
147
+
116
148
  def get_repos_forks_by_owner_repo(owner, repo, opt = {})
117
149
  @http.get("/repos/#{owner}/#{repo}/forks", opt)
118
150
  end
@@ -181,6 +213,10 @@ module Gitea
181
213
  @http.patch("/repos/#{owner}/#{repo}/hooks/#{id}", opt)
182
214
  end
183
215
 
216
+ def get_repos_hooks_hooktasks_by_owner_repo_id(owner, repo, id, opt={})
217
+ @http.get("/repos/#{owner}/#{repo}/hooks/#{id}/hooktasks", opt)
218
+ end
219
+
184
220
  def post_repos_hooks_tests_by_owner_repo_id(owner, repo, id, opt = {})
185
221
  @http.post("/repos/#{owner}/#{repo}/hooks/#{id}/tests", opt)
186
222
  end
@@ -221,6 +257,10 @@ module Gitea
221
257
  @http.post("/repos/#{owner}/#{repo}/pulls", opt)
222
258
  end
223
259
 
260
+ def get_repos_pulls_by_owner_repo_index(owner, repo, opt = {})
261
+ @http.get("/repos/#{owner}/#{repo}/pulls/#{index}", opt)
262
+ end
263
+
224
264
  def patch_repos_pulls_by_owner_repo_index(owner, repo, index, opt = {})
225
265
  @http.patch("/repos/#{owner}/#{repo}/pulls/#{index}", opt)
226
266
  end
@@ -285,6 +325,14 @@ module Gitea
285
325
  @http.get("/repos/#{owner}/#{repo}/raw/#{filepath}", opt)
286
326
  end
287
327
 
328
+ def get_repos_readme_by_owner_repo(owner, repo, opt={})
329
+ @http.get("/repos/#{owner}/#{repo}/readme", opt)
330
+ end
331
+
332
+ def get_repos_readme_by_owner_repo_dir(owner, repo, dir, opt={})
333
+ @http.get("/repos/#{owner}/#{repo}/readme/#{dir}", opt)
334
+ end
335
+
288
336
  def get_repos_releases_by_owner_repo(owner, repo, opt = {})
289
337
  @http.get("/repos/#{owner}/#{repo}/releases", opt)
290
338
  end
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Gitea
4
- VERSION = "0.8.0"
4
+ VERSION = "0.8.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitea-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - viletyy
@@ -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