gitlab 4.6.0 → 4.7.0

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.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/lib/gitlab/client/access_requests.rb +92 -90
  3. data/lib/gitlab/client/award_emojis.rb +126 -124
  4. data/lib/gitlab/client/boards.rb +81 -79
  5. data/lib/gitlab/client/branches.rb +89 -87
  6. data/lib/gitlab/client/build_variables.rb +117 -115
  7. data/lib/gitlab/client/builds.rb +98 -96
  8. data/lib/gitlab/client/commits.rb +167 -152
  9. data/lib/gitlab/client/deployments.rb +29 -27
  10. data/lib/gitlab/client/environments.rb +80 -78
  11. data/lib/gitlab/client/events.rb +54 -52
  12. data/lib/gitlab/client/group_milestones.rb +85 -83
  13. data/lib/gitlab/client/groups.rb +178 -176
  14. data/lib/gitlab/client/issues.rb +212 -188
  15. data/lib/gitlab/client/jobs.rb +150 -148
  16. data/lib/gitlab/client/keys.rb +14 -12
  17. data/lib/gitlab/client/labels.rb +79 -77
  18. data/lib/gitlab/client/merge_request_approvals.rb +101 -99
  19. data/lib/gitlab/client/merge_requests.rb +291 -277
  20. data/lib/gitlab/client/milestones.rb +85 -83
  21. data/lib/gitlab/client/namespaces.rb +18 -16
  22. data/lib/gitlab/client/notes.rb +260 -258
  23. data/lib/gitlab/client/pipeline_schedules.rb +123 -121
  24. data/lib/gitlab/client/pipeline_triggers.rb +93 -91
  25. data/lib/gitlab/client/pipelines.rb +73 -60
  26. data/lib/gitlab/client/projects.rb +538 -524
  27. data/lib/gitlab/client/repositories.rb +67 -65
  28. data/lib/gitlab/client/repository_files.rb +103 -101
  29. data/lib/gitlab/client/runners.rb +114 -112
  30. data/lib/gitlab/client/services.rb +45 -43
  31. data/lib/gitlab/client/sidekiq.rb +32 -30
  32. data/lib/gitlab/client/snippets.rb +86 -84
  33. data/lib/gitlab/client/system_hooks.rb +57 -55
  34. data/lib/gitlab/client/tags.rb +88 -86
  35. data/lib/gitlab/client/todos.rb +40 -38
  36. data/lib/gitlab/client/users.rb +243 -241
  37. data/lib/gitlab/client/versions.rb +13 -11
  38. data/lib/gitlab/error.rb +1 -1
  39. data/lib/gitlab/help.rb +1 -1
  40. data/lib/gitlab/page_links.rb +1 -1
  41. data/lib/gitlab/version.rb +1 -1
  42. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c2abe85ce03f9110e9d7c55e516487e125898a960de1c8f69ce752b12851a026
4
- data.tar.gz: 9bda4675dc3a8e1c408ba68c366a14855f4456660001bff17bba98f06de9ca42
3
+ metadata.gz: 421115b0e89dbdc41a5b604763a4d2f8c159117ea7a750112cd4ae4384716f46
4
+ data.tar.gz: f29e4c90ebf303275d2cdb40814019d537b7cd79d9ca620b234eab78f990c7ef
5
5
  SHA512:
6
- metadata.gz: be06faf90e256343833177899f3064af39042cb7e299364f499cc29a0d903b62219d0dc80cf8588b956a424c43f01d58d28fd7bdba69609b5cf3c23a495f44f0
7
- data.tar.gz: 412245730f19b0adc1f4fff19dd0e39373f7810ec00991e0303bf3287ac3f5d6b0dc2d132af93a09a272b254dc4c73fdadd29b2926e9e1761f55f66f4ef75f5e
6
+ metadata.gz: 0fa2447b6dff0b4335d542f199b3dac0b5171850417b01f8f0d2238eca7015707548308ccfa235b60443b2bf4fa436bb4981f6d21a36126d37c4432359c7a2b5
7
+ data.tar.gz: 15acf72e2442ea9aca44941545db106560ac07090c32012cc70a734dea36abb74ca57b1852350a29b825cf8080725a6989948e4faa92b09eaf75a209a7f6ddc2
@@ -1,101 +1,103 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Defines methods related to Award Emojis.
4
- # @see https://docs.gitlab.com/ce/api/access_requests.html
5
- module AccessRequests
6
- # Gets a list of access requests for a project viewable by the authenticated user.
7
- #
8
- # @example
9
- # Gitlab.project_access_requests(1)
10
- #
11
- # @param [Integer, String] :project(required) The ID or name of a project.
12
- # @return [Array<Gitlab::ObjectifiedHash>] List of project access requests
13
- def project_access_requests(project)
14
- get("/projects/#{url_encode project}/access_requests")
15
- end
3
+ class Gitlab::Client
4
+ # Defines methods related to Award Emojis.
5
+ # @see https://docs.gitlab.com/ce/api/access_requests.html
6
+ module AccessRequests
7
+ # Gets a list of access requests for a project viewable by the authenticated user.
8
+ #
9
+ # @example
10
+ # Gitlab.project_access_requests(1)
11
+ #
12
+ # @param [Integer, String] :project(required) The ID or name of a project.
13
+ # @return [Array<Gitlab::ObjectifiedHash>] List of project access requests
14
+ def project_access_requests(project)
15
+ get("/projects/#{url_encode project}/access_requests")
16
+ end
16
17
 
17
- # Gets a list of access requests for a group viewable by the authenticated user.
18
- #
19
- # @example
20
- # Gitlab.group_access_requests(1)
21
- #
22
- # @param [Integer, String] :group(required) The ID or name of a group.
23
- # @return [Array<Gitlab::ObjectifiedHash>] List of group access requests
24
- def group_access_requests(group)
25
- get("/groups/#{url_encode group}/access_requests")
26
- end
18
+ # Gets a list of access requests for a group viewable by the authenticated user.
19
+ #
20
+ # @example
21
+ # Gitlab.group_access_requests(1)
22
+ #
23
+ # @param [Integer, String] :group(required) The ID or name of a group.
24
+ # @return [Array<Gitlab::ObjectifiedHash>] List of group access requests
25
+ def group_access_requests(group)
26
+ get("/groups/#{url_encode group}/access_requests")
27
+ end
27
28
 
28
- # Requests access for the authenticated user to a project.
29
- #
30
- # @example
31
- # Gitlab.request_project_access(1)
32
- #
33
- # @param [Integer, String] :project(required) The ID or name of a project.
34
- # @return <Gitlab::ObjectifiedHash] Information about the requested project access
35
- def request_project_access(project)
36
- post("/projects/#{url_encode project}/access_requests")
37
- end
29
+ # Requests access for the authenticated user to a project.
30
+ #
31
+ # @example
32
+ # Gitlab.request_project_access(1)
33
+ #
34
+ # @param [Integer, String] :project(required) The ID or name of a project.
35
+ # @return <Gitlab::ObjectifiedHash] Information about the requested project access
36
+ def request_project_access(project)
37
+ post("/projects/#{url_encode project}/access_requests")
38
+ end
38
39
 
39
- # Requests access for the authenticated user to a group.
40
- #
41
- # @example
42
- # Gitlab.request_group_access(1)
43
- #
44
- # @param [Integer, String] :group(required) The ID or name of a group.
45
- # @return <Gitlab::ObjectifiedHash] Information about the requested group access
46
- def request_group_access(group)
47
- post("/groups/#{url_encode group}/access_requests")
48
- end
40
+ # Requests access for the authenticated user to a group.
41
+ #
42
+ # @example
43
+ # Gitlab.request_group_access(1)
44
+ #
45
+ # @param [Integer, String] :group(required) The ID or name of a group.
46
+ # @return <Gitlab::ObjectifiedHash] Information about the requested group access
47
+ def request_group_access(group)
48
+ post("/groups/#{url_encode group}/access_requests")
49
+ end
49
50
 
50
- # Approves a project access request for the given user.
51
- #
52
- # @example
53
- # Gitlab.approve_project_access_request(1, 1)
54
- # Gitlab.approve_project_access_request(1, 1, {access_level: '30'})
55
- #
56
- # @param [Integer, String] :project(required) The ID or name of a project.
57
- # @param [Integer] :user_id(required) The user ID of the access requester
58
- # @option options [Integer] :access_level(optional) A valid access level (defaults: 30, developer access level)
59
- # @return <Gitlab::ObjectifiedHash] Information about the approved project access request
60
- def approve_project_access_request(project, user_id, options = {})
61
- put("/projects/#{url_encode project}/access_requests/#{user_id}/approve", body: options)
62
- end
51
+ # Approves a project access request for the given user.
52
+ #
53
+ # @example
54
+ # Gitlab.approve_project_access_request(1, 1)
55
+ # Gitlab.approve_project_access_request(1, 1, {access_level: '30'})
56
+ #
57
+ # @param [Integer, String] :project(required) The ID or name of a project.
58
+ # @param [Integer] :user_id(required) The user ID of the access requester
59
+ # @option options [Integer] :access_level(optional) A valid access level (defaults: 30, developer access level)
60
+ # @return <Gitlab::ObjectifiedHash] Information about the approved project access request
61
+ def approve_project_access_request(project, user_id, options = {})
62
+ put("/projects/#{url_encode project}/access_requests/#{user_id}/approve", body: options)
63
+ end
63
64
 
64
- # Approves a group access request for the given user.
65
- #
66
- # @example
67
- # Gitlab.approve_group_access_request(1, 1)
68
- # Gitlab.approve_group_access_request(1, 1, {access_level: '30'})
69
- #
70
- # @param [Integer, String] :group(required) The ID or name of a group.
71
- # @param [Integer] :user_id(required) The user ID of the access requester
72
- # @option options [Integer] :access_level(optional) A valid access level (defaults: 30, developer access level)
73
- # @return <Gitlab::ObjectifiedHash] Information about the approved group access request
74
- def approve_group_access_request(group, user_id, options = {})
75
- put("/groups/#{url_encode group}/access_requests/#{user_id}/approve", body: options)
76
- end
65
+ # Approves a group access request for the given user.
66
+ #
67
+ # @example
68
+ # Gitlab.approve_group_access_request(1, 1)
69
+ # Gitlab.approve_group_access_request(1, 1, {access_level: '30'})
70
+ #
71
+ # @param [Integer, String] :group(required) The ID or name of a group.
72
+ # @param [Integer] :user_id(required) The user ID of the access requester
73
+ # @option options [Integer] :access_level(optional) A valid access level (defaults: 30, developer access level)
74
+ # @return <Gitlab::ObjectifiedHash] Information about the approved group access request
75
+ def approve_group_access_request(group, user_id, options = {})
76
+ put("/groups/#{url_encode group}/access_requests/#{user_id}/approve", body: options)
77
+ end
77
78
 
78
- # Denies a project access request for the given user.
79
- #
80
- # @example
81
- # Gitlab.deny_project_access_request(1, 1)
82
- #
83
- # @param [Integer, String] :project(required) The ID or name of a project.
84
- # @param [Integer] :user_id(required) The user ID of the access requester
85
- # @return [void] This API call returns an empty response body.
86
- def deny_project_access_request(project, user_id)
87
- delete("/projects/#{url_encode project}/access_requests/#{user_id}")
88
- end
79
+ # Denies a project access request for the given user.
80
+ #
81
+ # @example
82
+ # Gitlab.deny_project_access_request(1, 1)
83
+ #
84
+ # @param [Integer, String] :project(required) The ID or name of a project.
85
+ # @param [Integer] :user_id(required) The user ID of the access requester
86
+ # @return [void] This API call returns an empty response body.
87
+ def deny_project_access_request(project, user_id)
88
+ delete("/projects/#{url_encode project}/access_requests/#{user_id}")
89
+ end
89
90
 
90
- # Denies a group access request for the given user.
91
- #
92
- # @example
93
- # Gitlab.deny_group_access_request(1, 1)
94
- #
95
- # @param [Integer, String] :group(required) The ID or name of a group.
96
- # @param [Integer] :user_id(required) The user ID of the access requester
97
- # @return [void] This API call returns an empty response body.
98
- def deny_group_access_request(group, user_id)
99
- delete("/groups/#{url_encode group}/access_requests/#{user_id}")
91
+ # Denies a group access request for the given user.
92
+ #
93
+ # @example
94
+ # Gitlab.deny_group_access_request(1, 1)
95
+ #
96
+ # @param [Integer, String] :group(required) The ID or name of a group.
97
+ # @param [Integer] :user_id(required) The user ID of the access requester
98
+ # @return [void] This API call returns an empty response body.
99
+ def deny_group_access_request(group, user_id)
100
+ delete("/groups/#{url_encode group}/access_requests/#{user_id}")
101
+ end
100
102
  end
101
103
  end
@@ -1,135 +1,137 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Defines methods related to Award Emojis.
4
- # @see https://docs.gitlab.com/ce/api/award_emoji.html
5
- module AwardEmojis
6
- # Gets a list of all award emoji for an awardable(issue, merge request or snippet)
7
- #
8
- # @example
9
- # Gitlab.award_emojis(1, 80, 'issue')
10
- # Gitlab.award_emojis(1, 60, 'merge_request')
11
- # Gitlab.award_emojis(1, 40, 'snippet')
12
- #
13
- # @param [Integer] project The ID of a project.
14
- # @param [Integer] awardable_id The ID of an awardable(issue, merge request or snippet).
15
- # @param [String] awardable_type The type of the awardable(can be 'issue', 'merge_request' or 'snippet')
16
- # @return [Array<Gitlab::ObjectifiedHash>]
17
- def award_emojis(project, awardable_id, awardable_type)
18
- get("/projects/#{url_encode project}/#{awardable_type}s/#{awardable_id}/award_emoji")
19
- end
3
+ class Gitlab::Client
4
+ # Defines methods related to Award Emojis.
5
+ # @see https://docs.gitlab.com/ce/api/award_emoji.html
6
+ module AwardEmojis
7
+ # Gets a list of all award emoji for an awardable(issue, merge request or snippet)
8
+ #
9
+ # @example
10
+ # Gitlab.award_emojis(1, 80, 'issue')
11
+ # Gitlab.award_emojis(1, 60, 'merge_request')
12
+ # Gitlab.award_emojis(1, 40, 'snippet')
13
+ #
14
+ # @param [Integer] project The ID of a project.
15
+ # @param [Integer] awardable_id The ID of an awardable(issue, merge request or snippet).
16
+ # @param [String] awardable_type The type of the awardable(can be 'issue', 'merge_request' or 'snippet')
17
+ # @return [Array<Gitlab::ObjectifiedHash>]
18
+ def award_emojis(project, awardable_id, awardable_type)
19
+ get("/projects/#{url_encode project}/#{awardable_type}s/#{awardable_id}/award_emoji")
20
+ end
20
21
 
21
- # Gets a list of all award emoji for a single note on an awardable(issue, merge request or snippet)
22
- #
23
- # @example
24
- # Gitlab.note_award_emojis(1, 80, 'issue', 1)
25
- # Gitlab.note_award_emojis(1, 60, 'merge_request', 1)
26
- # Gitlab.note_award_emojis(1, 40, 'snippet', 1)
27
- #
28
- # @param [Integer] project The ID of a project.
29
- # @param [Integer] awardable_id The ID of an awardable(issue, merge request or snippet).
30
- # @param [String] awardable_type The type of the awardable(can be 'issue', 'merge_request' or 'snippet')
31
- # @param [Integer] note_id The ID of a note.
32
- # @return [Array<Gitlab::ObjectifiedHash>]
33
- def note_award_emojis(project, awardable_id, awardable_type, note_id)
34
- get("/projects/#{url_encode project}/#{awardable_type}s/#{awardable_id}/notes/#{note_id}/award_emoji")
35
- end
22
+ # Gets a list of all award emoji for a single note on an awardable(issue, merge request or snippet)
23
+ #
24
+ # @example
25
+ # Gitlab.note_award_emojis(1, 80, 'issue', 1)
26
+ # Gitlab.note_award_emojis(1, 60, 'merge_request', 1)
27
+ # Gitlab.note_award_emojis(1, 40, 'snippet', 1)
28
+ #
29
+ # @param [Integer] project The ID of a project.
30
+ # @param [Integer] awardable_id The ID of an awardable(issue, merge request or snippet).
31
+ # @param [String] awardable_type The type of the awardable(can be 'issue', 'merge_request' or 'snippet')
32
+ # @param [Integer] note_id The ID of a note.
33
+ # @return [Array<Gitlab::ObjectifiedHash>]
34
+ def note_award_emojis(project, awardable_id, awardable_type, note_id)
35
+ get("/projects/#{url_encode project}/#{awardable_type}s/#{awardable_id}/notes/#{note_id}/award_emoji")
36
+ end
36
37
 
37
- # Gets a single award emoji for an awardable(issue, merge request or snippet)
38
- #
39
- # @example
40
- # Gitlab.award_emoji(1, 80, 'issue', 4)
41
- # Gitlab.award_emoji(1, 60, 'merge_request', 4)
42
- # Gitlab.award_emoji(1, 40, 'snippet', 4)
43
- #
44
- # @param [Integer] project The ID of a project.
45
- # @param [Integer] awardable_id The ID of an awardable(issue, merge request or snippet).
46
- # @param [String] awardable_type The type of the awardable(can be 'issue', 'merge_request' or 'snippet')
47
- # @param [Integer] award_id The ID of an award emoji.
48
- # @return [Gitlab::ObjectifiedHash]
49
- def award_emoji(project, awardable_id, awardable_type, award_id)
50
- get("/projects/#{url_encode project}/#{awardable_type}s/#{awardable_id}/award_emoji/#{award_id}")
51
- end
38
+ # Gets a single award emoji for an awardable(issue, merge request or snippet)
39
+ #
40
+ # @example
41
+ # Gitlab.award_emoji(1, 80, 'issue', 4)
42
+ # Gitlab.award_emoji(1, 60, 'merge_request', 4)
43
+ # Gitlab.award_emoji(1, 40, 'snippet', 4)
44
+ #
45
+ # @param [Integer] project The ID of a project.
46
+ # @param [Integer] awardable_id The ID of an awardable(issue, merge request or snippet).
47
+ # @param [String] awardable_type The type of the awardable(can be 'issue', 'merge_request' or 'snippet')
48
+ # @param [Integer] award_id The ID of an award emoji.
49
+ # @return [Gitlab::ObjectifiedHash]
50
+ def award_emoji(project, awardable_id, awardable_type, award_id)
51
+ get("/projects/#{url_encode project}/#{awardable_type}s/#{awardable_id}/award_emoji/#{award_id}")
52
+ end
52
53
 
53
- # Gets a single award emoji from a single note on an awardable(issue, merge request or snippet)
54
- #
55
- # @example
56
- # Gitlab.note_award_emoji(1, 80, 'issue', 1, 4)
57
- # Gitlab.note_award_emoji(1, 60, 'merge_request', 1, 4)
58
- # Gitlab.note_award_emoji(1, 40, 'snippet', 1, 4)
59
- #
60
- # @param [Integer] project The ID of a project.
61
- # @param [Integer] awardable_id The ID of an awardable(issue, merge request or snippet).
62
- # @param [String] awardable_type The type of the awardable(can be 'issue', 'merge_request' or 'snippet')
63
- # @param [Integer] note_id The ID of a note.
64
- # @param [Integer] award_id The ID of an award emoji.
65
- # @return [Gitlab::ObjectifiedHash]
66
- def note_award_emoji(project, awardable_id, awardable_type, note_id, award_id)
67
- get("/projects/#{url_encode project}/#{awardable_type}s/#{awardable_id}/notes/#{note_id}/award_emoji/#{award_id}")
68
- end
54
+ # Gets a single award emoji from a single note on an awardable(issue, merge request or snippet)
55
+ #
56
+ # @example
57
+ # Gitlab.note_award_emoji(1, 80, 'issue', 1, 4)
58
+ # Gitlab.note_award_emoji(1, 60, 'merge_request', 1, 4)
59
+ # Gitlab.note_award_emoji(1, 40, 'snippet', 1, 4)
60
+ #
61
+ # @param [Integer] project The ID of a project.
62
+ # @param [Integer] awardable_id The ID of an awardable(issue, merge request or snippet).
63
+ # @param [String] awardable_type The type of the awardable(can be 'issue', 'merge_request' or 'snippet')
64
+ # @param [Integer] note_id The ID of a note.
65
+ # @param [Integer] award_id The ID of an award emoji.
66
+ # @return [Gitlab::ObjectifiedHash]
67
+ def note_award_emoji(project, awardable_id, awardable_type, note_id, award_id)
68
+ get("/projects/#{url_encode project}/#{awardable_type}s/#{awardable_id}/notes/#{note_id}/award_emoji/#{award_id}")
69
+ end
69
70
 
70
- # Awards a new emoji to an awardable(issue, merge request or snippet)
71
- #
72
- # @example
73
- # Gitlab.create_award_emoji(1, 80, 'issue', 'blowfish')
74
- # Gitlab.create_award_emoji(1, 80, 'merge_request', 'blowfish')
75
- # Gitlab.create_award_emoji(1, 80, 'snippet', 'blowfish')
76
- #
77
- # @param [Integer] project The ID of a project.
78
- # @param [Integer] awardable_id The ID of an awardable(issue, merge request or snippet).
79
- # @param [String] awardable_type The type of the awardable(can be 'issue', 'merge_request' or 'snippet')
80
- # @param [String] emoji_name The name of the emoji, without colons.
81
- # @return [Gitlab::ObjectifiedHash]
82
- def create_award_emoji(project, awardable_id, awardable_type, emoji_name)
83
- post("/projects/#{url_encode project}/#{awardable_type}s/#{awardable_id}/award_emoji", body: { name: emoji_name })
84
- end
71
+ # Awards a new emoji to an awardable(issue, merge request or snippet)
72
+ #
73
+ # @example
74
+ # Gitlab.create_award_emoji(1, 80, 'issue', 'blowfish')
75
+ # Gitlab.create_award_emoji(1, 80, 'merge_request', 'blowfish')
76
+ # Gitlab.create_award_emoji(1, 80, 'snippet', 'blowfish')
77
+ #
78
+ # @param [Integer] project The ID of a project.
79
+ # @param [Integer] awardable_id The ID of an awardable(issue, merge request or snippet).
80
+ # @param [String] awardable_type The type of the awardable(can be 'issue', 'merge_request' or 'snippet')
81
+ # @param [String] emoji_name The name of the emoji, without colons.
82
+ # @return [Gitlab::ObjectifiedHash]
83
+ def create_award_emoji(project, awardable_id, awardable_type, emoji_name)
84
+ post("/projects/#{url_encode project}/#{awardable_type}s/#{awardable_id}/award_emoji", body: { name: emoji_name })
85
+ end
85
86
 
86
- # Awards a new emoji to a note on an awardable(issue, merge request or snippet)
87
- #
88
- # @example
89
- # Gitlab.create_note_award_emoji(1, 80, 'issue', 1, 'blowfish')
90
- # Gitlab.create_note_award_emoji(1, 80, 'merge_request', 1, 'blowfish')
91
- # Gitlab.create_note_award_emoji(1, 80, 'snippet', 1, 'blowfish')
92
- #
93
- # @param [Integer] project The ID of a project.
94
- # @param [Integer] awardable_id The ID of an awardable(issue, merge request or snippet).
95
- # @param [String] awardable_type The type of the awardable(can be 'issue', 'merge_request' or 'snippet')
96
- # @param [Integer] note_id The ID of a note.
97
- # @param [String] emoji_name The name of the emoji, without colons.
98
- # @return [Gitlab::ObjectifiedHash]
99
- def create_note_award_emoji(project, awardable_id, awardable_type, note_id, emoji_name)
100
- post("/projects/#{url_encode project}/#{awardable_type}s/#{awardable_id}/notes/#{note_id}/award_emoji", body: { name: emoji_name })
101
- end
87
+ # Awards a new emoji to a note on an awardable(issue, merge request or snippet)
88
+ #
89
+ # @example
90
+ # Gitlab.create_note_award_emoji(1, 80, 'issue', 1, 'blowfish')
91
+ # Gitlab.create_note_award_emoji(1, 80, 'merge_request', 1, 'blowfish')
92
+ # Gitlab.create_note_award_emoji(1, 80, 'snippet', 1, 'blowfish')
93
+ #
94
+ # @param [Integer] project The ID of a project.
95
+ # @param [Integer] awardable_id The ID of an awardable(issue, merge request or snippet).
96
+ # @param [String] awardable_type The type of the awardable(can be 'issue', 'merge_request' or 'snippet')
97
+ # @param [Integer] note_id The ID of a note.
98
+ # @param [String] emoji_name The name of the emoji, without colons.
99
+ # @return [Gitlab::ObjectifiedHash]
100
+ def create_note_award_emoji(project, awardable_id, awardable_type, note_id, emoji_name)
101
+ post("/projects/#{url_encode project}/#{awardable_type}s/#{awardable_id}/notes/#{note_id}/award_emoji", body: { name: emoji_name })
102
+ end
102
103
 
103
- # Deletes a single award emoji from an awardable(issue, merge request or snippet)
104
- #
105
- # @example
106
- # Gitlab.delete_award_emoji(1, 80, 'issue', 4)
107
- # Gitlab.delete_award_emoji(1, 60, 'merge_request', 4)
108
- # Gitlab.delete_award_emoji(1, 40, 'snippet', 4)
109
- #
110
- # @param [Integer] project The ID of a project.
111
- # @param [Integer] awardable_id The ID of an awardable(issue, merge request or snippet).
112
- # @param [String] awardable_type The type of the awardable(can be 'issue', 'merge_request' or 'snippet')
113
- # @param [Integer] award_id The ID of an award emoji.
114
- # @return [void] This API call returns an empty response body.
115
- def delete_award_emoji(project, awardable_id, awardable_type, award_id)
116
- delete("/projects/#{url_encode project}/#{awardable_type}s/#{awardable_id}/award_emoji/#{award_id}")
117
- end
104
+ # Deletes a single award emoji from an awardable(issue, merge request or snippet)
105
+ #
106
+ # @example
107
+ # Gitlab.delete_award_emoji(1, 80, 'issue', 4)
108
+ # Gitlab.delete_award_emoji(1, 60, 'merge_request', 4)
109
+ # Gitlab.delete_award_emoji(1, 40, 'snippet', 4)
110
+ #
111
+ # @param [Integer] project The ID of a project.
112
+ # @param [Integer] awardable_id The ID of an awardable(issue, merge request or snippet).
113
+ # @param [String] awardable_type The type of the awardable(can be 'issue', 'merge_request' or 'snippet')
114
+ # @param [Integer] award_id The ID of an award emoji.
115
+ # @return [void] This API call returns an empty response body.
116
+ def delete_award_emoji(project, awardable_id, awardable_type, award_id)
117
+ delete("/projects/#{url_encode project}/#{awardable_type}s/#{awardable_id}/award_emoji/#{award_id}")
118
+ end
118
119
 
119
- # Deletes a single award emoji from a single note on an awardable(issue, merge request or snippet)
120
- #
121
- # @example
122
- # Gitlab.delete_note_award_emoji(1, 80, 'issue', 1, 4)
123
- # Gitlab.delete_note_award_emoji(1, 60, 'merge_request', 1, 4)
124
- # Gitlab.delete_note_award_emoji(1, 40, 'snippet', 1, 4)
125
- #
126
- # @param [Integer] project The ID of a project.
127
- # @param [Integer] awardable_id The ID of an awardable(issue, merge request or snippet).
128
- # @param [String] awardable_type The type of the awardable(can be 'issue', 'merge_request' or 'snippet')
129
- # @param [Integer] note_id The ID of a note.
130
- # @param [Integer] award_id The ID of an award emoji.
131
- # @return [void] This API call returns an empty response body.
132
- def delete_note_award_emoji(project, awardable_id, awardable_type, note_id, award_id)
133
- delete("/projects/#{url_encode project}/#{awardable_type}s/#{awardable_id}/notes/#{note_id}/award_emoji/#{award_id}")
120
+ # Deletes a single award emoji from a single note on an awardable(issue, merge request or snippet)
121
+ #
122
+ # @example
123
+ # Gitlab.delete_note_award_emoji(1, 80, 'issue', 1, 4)
124
+ # Gitlab.delete_note_award_emoji(1, 60, 'merge_request', 1, 4)
125
+ # Gitlab.delete_note_award_emoji(1, 40, 'snippet', 1, 4)
126
+ #
127
+ # @param [Integer] project The ID of a project.
128
+ # @param [Integer] awardable_id The ID of an awardable(issue, merge request or snippet).
129
+ # @param [String] awardable_type The type of the awardable(can be 'issue', 'merge_request' or 'snippet')
130
+ # @param [Integer] note_id The ID of a note.
131
+ # @param [Integer] award_id The ID of an award emoji.
132
+ # @return [void] This API call returns an empty response body.
133
+ def delete_note_award_emoji(project, awardable_id, awardable_type, note_id, award_id)
134
+ delete("/projects/#{url_encode project}/#{awardable_type}s/#{awardable_id}/notes/#{note_id}/award_emoji/#{award_id}")
135
+ end
134
136
  end
135
137
  end