tinybucket2 1.7.1 → 1.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/tinybucket/api/helper/issues_helper.rb +29 -0
- data/lib/tinybucket/api/issues_api.rb +48 -0
- data/lib/tinybucket/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d966a20bf2ccd1e21640fb3808c0d5b4f319e22d58815df5868e263e9d6e548e
|
4
|
+
data.tar.gz: d63838fb613a5821c9c254a78778a21de1f62ad233faba654319ca203a32684e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71ceb22c592b6136bc1ae78f6fb27c9bc33451704370cf043795c80d579a4776c12fd32b1ce51148b143f49efa3c81a56ce25d666516a5ccc0b4f25d594cdabc
|
7
|
+
data.tar.gz: 97a78d7c049802d8c399fc20476b62fe289916c996f6feac9462c7a3e7e25fab2e23157200960527574fd72a235383c6900a7517e0b5b4dfd086356f521f93b2
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Tinybucket
|
4
|
+
module Api
|
5
|
+
module Helper
|
6
|
+
module IssuesHelper
|
7
|
+
include ::Tinybucket::Api::Helper::ApiHelper
|
8
|
+
|
9
|
+
private
|
10
|
+
|
11
|
+
def path_to_list
|
12
|
+
build_path(base_path)
|
13
|
+
end
|
14
|
+
|
15
|
+
def path_to_find(issue)
|
16
|
+
build_path(base_path,
|
17
|
+
[issue, 'issue'])
|
18
|
+
end
|
19
|
+
|
20
|
+
def base_path
|
21
|
+
build_path('/repositories',
|
22
|
+
[repo_owner, 'repo_owner'],
|
23
|
+
[repo_slug, 'repo_slug'],
|
24
|
+
'issues')
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Tinybucket
|
4
|
+
module Api
|
5
|
+
# Issues Api client
|
6
|
+
#
|
7
|
+
# @!attribute [rw] repo_owner
|
8
|
+
# @return [String] repository owner name.
|
9
|
+
# @!attribute [rw] repo_slug
|
10
|
+
# @return [String] {https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D repo_slug}.
|
11
|
+
class IssuesApi < BaseApi
|
12
|
+
include Tinybucket::Api::Helper::IssuesHelper
|
13
|
+
|
14
|
+
attr_accessor :repo_owner, :repo_slug
|
15
|
+
|
16
|
+
# Send 'GET a issues list for a repository' request
|
17
|
+
#
|
18
|
+
# @see https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D/issues#get
|
19
|
+
# GET a issues list for a repository
|
20
|
+
#
|
21
|
+
# @param options [Hash]
|
22
|
+
# @return [Tinybucket::Model::Page]
|
23
|
+
def list(options = {})
|
24
|
+
get_path(
|
25
|
+
path_to_list,
|
26
|
+
options,
|
27
|
+
get_parser(:collection, Tinybucket::Model::Issue)
|
28
|
+
)
|
29
|
+
end
|
30
|
+
|
31
|
+
# Send 'GET an individual issue' request
|
32
|
+
#
|
33
|
+
# @see https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D/issues/%7Bname%7D#get
|
34
|
+
# GET an individual issue
|
35
|
+
#
|
36
|
+
# @param name [String] The issue name
|
37
|
+
# @param options [Hash]
|
38
|
+
# @return [Tinybucket::Model::Issue]
|
39
|
+
def find(name, options = {})
|
40
|
+
get_path(
|
41
|
+
path_to_find(name),
|
42
|
+
options,
|
43
|
+
get_parser(:object, Tinybucket::Model::Issue)
|
44
|
+
)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
data/lib/tinybucket/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tinybucket2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- hirakiuc
|
@@ -138,12 +138,14 @@ files:
|
|
138
138
|
- lib/tinybucket/api/helper/comments_helper.rb
|
139
139
|
- lib/tinybucket/api/helper/commits_helper.rb
|
140
140
|
- lib/tinybucket/api/helper/diff_helper.rb
|
141
|
+
- lib/tinybucket/api/helper/issues_helper.rb
|
141
142
|
- lib/tinybucket/api/helper/projects_helper.rb
|
142
143
|
- lib/tinybucket/api/helper/pull_requests_helper.rb
|
143
144
|
- lib/tinybucket/api/helper/repo_helper.rb
|
144
145
|
- lib/tinybucket/api/helper/repos_helper.rb
|
145
146
|
- lib/tinybucket/api/helper/team_helper.rb
|
146
147
|
- lib/tinybucket/api/helper/user_helper.rb
|
148
|
+
- lib/tinybucket/api/issues_api.rb
|
147
149
|
- lib/tinybucket/api/projects_api.rb
|
148
150
|
- lib/tinybucket/api/pull_requests_api.rb
|
149
151
|
- lib/tinybucket/api/repo_api.rb
|