gitea-client 0.9.0 → 0.9.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: 04a87240680bee6e0ead6b72f54bb8f5ebd8c74b68451a270b4b6a50615fbeb1
4
- data.tar.gz: 86d94f3f4cdbd684370f510d4fb7a7ac1874322c69529e0e21492c16e56ba089
3
+ metadata.gz: 1a86feed7c458159c32c4a9dc5df71aea90313379611c01f3aaf2d9a92dc45b9
4
+ data.tar.gz: 5d2b6143ab2818ebc53ca7242e45edaa0b410d83d4ba4e0f7f4cc573d98dda3e
5
5
  SHA512:
6
- metadata.gz: b71a9e5e89442ab4af9c6fb750333b4c142046c99cb5896e744f7ef73a4faf6b49ef54b678619a8c316176943c83666e68672805366f1b46bef0708f3b69b3c8
7
- data.tar.gz: c1cb50386a2ea80bbe4450043787f2075b9b03f22b703da01452cab27a27f99403756d31cf435073924aea2c53d7947275581625e49f46587c351bde72896576
6
+ metadata.gz: 5d7b33a67d114bdf951bb46745821d82bbd1b229cfdfd2d42fdf57ca6a2d9263a81a126f33852dcfa6d8af6442c7ae649b69298e104a375a2bf0f946e3be85bd
7
+ data.tar.gz: 2537f303f67bdacc819eb4ecf753035853ca0b052e67ad038a823c9b7c3b3e4d1fe8fab945f92f0f77018f280c780e29b635497d45f0f2768b2eed5499ab4d21
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitea-client (0.9.0)
4
+ gitea-client (0.9.1)
5
5
  rest-client (~> 2.1.0)
6
6
 
7
7
  GEM
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.6.0"
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
@@ -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,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
@@ -89,10 +109,18 @@ module Gitea
89
109
  @http.get("/repos/#{owner}/#{repo}/commits/#{ref}/statuses", opt)
90
110
  end
91
111
 
112
+ def get_repos_commits_slice_by_owner_repo(owner, repo, opt = {})
113
+ @http.get("/repos/#{owner}/#{repo}/commits_slice", opt)
114
+ end
115
+
92
116
  def get_repos_contents_by_owner_repo(owner, repo, opt = {})
93
117
  @http.get("/repos/#{owner}/#{repo}/contents", opt)
94
118
  end
95
119
 
120
+ def post_repos_contents_batch_by_owner_repo(owner, repo, opt = {})
121
+ @http.post("/repos/#{owner}/#{repo}/contents/batch", opt)
122
+ end
123
+
96
124
  def get_repos_contents_by_owner_repo_filepath(owner, repo, filepath, opt = {})
97
125
  @http.get("/repos/#{owner}/#{repo}/contents/#{filepath}", opt)
98
126
  end
@@ -109,10 +137,26 @@ module Gitea
109
137
  @http.delete("/repos/#{owner}/#{repo}/contents/#{filepath}", opt)
110
138
  end
111
139
 
140
+ def get_repos_contributors_by_owner_repo(owner, repo, opt={})
141
+ @http.get("/repos/#{owner}/#{repo}/contributors", opt)
142
+ end
143
+
144
+ def get_repos_count_by_owner_repo(owner, repo, opt={})
145
+ @http.get("/repos/#{owner}/#{repo}/count", opt)
146
+ end
147
+
112
148
  def get_repos_editorconfig_by_owner_repo_filepath(owner, repo, filepath, opt = {})
113
149
  @http.get("/repos/#{owner}/#{repo}/editorconfig/#{filepath}", opt)
114
150
  end
115
151
 
152
+ def get_repos_file_commits_by_owner_repo_filepath(owner, repo, filepath, opt={})
153
+ @http.get("/repos/#{owner}/#{repo}/file_commits/#{filepath}", opt)
154
+ end
155
+
156
+ def get_repos_find_by_owner_repo_filepath(owner, repo, filepath, opt={})
157
+ @http.get("/repos/#{owner}/#{repo}/find", opt)
158
+ end
159
+
116
160
  def get_repos_forks_by_owner_repo(owner, repo, opt = {})
117
161
  @http.get("/repos/#{owner}/#{repo}/forks", opt)
118
162
  end
@@ -181,6 +225,10 @@ module Gitea
181
225
  @http.patch("/repos/#{owner}/#{repo}/hooks/#{id}", opt)
182
226
  end
183
227
 
228
+ def get_repos_hooks_hooktasks_by_owner_repo_id(owner, repo, id, opt={})
229
+ @http.get("/repos/#{owner}/#{repo}/hooks/#{id}/hooktasks", opt)
230
+ end
231
+
184
232
  def post_repos_hooks_tests_by_owner_repo_id(owner, repo, id, opt = {})
185
233
  @http.post("/repos/#{owner}/#{repo}/hooks/#{id}/tests", opt)
186
234
  end
@@ -221,6 +269,10 @@ module Gitea
221
269
  @http.post("/repos/#{owner}/#{repo}/pulls", opt)
222
270
  end
223
271
 
272
+ def get_repos_pulls_by_owner_repo_index(owner, repo, opt = {})
273
+ @http.get("/repos/#{owner}/#{repo}/pulls/#{index}", opt)
274
+ end
275
+
224
276
  def patch_repos_pulls_by_owner_repo_index(owner, repo, index, opt = {})
225
277
  @http.patch("/repos/#{owner}/#{repo}/pulls/#{index}", opt)
226
278
  end
@@ -285,6 +337,14 @@ module Gitea
285
337
  @http.get("/repos/#{owner}/#{repo}/raw/#{filepath}", opt)
286
338
  end
287
339
 
340
+ def get_repos_readme_by_owner_repo(owner, repo, opt={})
341
+ @http.get("/repos/#{owner}/#{repo}/readme", opt)
342
+ end
343
+
344
+ def get_repos_readme_by_owner_repo_dir(owner, repo, dir, opt={})
345
+ @http.get("/repos/#{owner}/#{repo}/readme/#{dir}", opt)
346
+ end
347
+
288
348
  def get_repos_releases_by_owner_repo(owner, repo, opt = {})
289
349
  @http.get("/repos/#{owner}/#{repo}/releases", opt)
290
350
  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.9.0"
4
+ VERSION = "0.9.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.9.0
4
+ version: 0.9.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
@@ -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.6.0
80
+ version: 2.4.0
80
81
  required_rubygems_version: !ruby/object:Gem::Requirement
81
82
  requirements:
82
83
  - - ">="