Module: Gitlab::Client::AwardEmojis
- Included in:
- Gitlab::Client
- Defined in:
- lib/gitlab/client/award_emojis.rb
Overview
Defines methods related to Award Emojis.
Instance Method Summary collapse
-
#award_emoji(project, awardable_id, awardable_type, award_id) ⇒ Gitlab::ObjectifiedHash
Gets a single award emoji for an awardable(issue, merge request or snippet).
-
#award_emojis(project, awardable_id, awardable_type) ⇒ Array<Gitlab::ObjectifiedHash>
Gets a list of all award emoji for an awardable(issue, merge request or snippet).
-
#create_award_emoji(project, awardable_id, awardable_type, emoji_name) ⇒ Gitlab::ObjectifiedHash
Awards a new emoji to an awardable(issue, merge request or snippet).
-
#create_note_award_emoji(project, awardable_id, awardable_type, note_id, emoji_name) ⇒ Gitlab::ObjectifiedHash
Awards a new emoji to a note on an awardable(issue, merge request or snippet).
-
#delete_award_emoji(project, awardable_id, awardable_type, award_id) ⇒ void
Deletes a single award emoji from an awardable(issue, merge request or snippet).
-
#delete_note_award_emoji(project, awardable_id, awardable_type, note_id, award_id) ⇒ void
Deletes a single award emoji from a single note on an awardable(issue, merge request or snippet).
-
#note_award_emoji(project, awardable_id, awardable_type, note_id, award_id) ⇒ Gitlab::ObjectifiedHash
Gets a single award emoji from a single note on an awardable(issue, merge request or snippet).
-
#note_award_emojis(project, awardable_id, awardable_type, note_id) ⇒ Array<Gitlab::ObjectifiedHash>
Gets a list of all award emoji for a single note on an awardable(issue, merge request or snippet).
Instance Method Details
#award_emoji(project, awardable_id, awardable_type, award_id) ⇒ Gitlab::ObjectifiedHash
Gets a single award emoji for an awardable(issue, merge request or snippet)
50 51 52 |
# File 'lib/gitlab/client/award_emojis.rb', line 50 def award_emoji(project, awardable_id, awardable_type, award_id) get("/projects/#{url_encode project}/#{awardable_type}s/#{awardable_id}/award_emoji/#{award_id}") end |
#award_emojis(project, awardable_id, awardable_type) ⇒ Array<Gitlab::ObjectifiedHash>
Gets a list of all award emoji for an awardable(issue, merge request or snippet)
18 19 20 |
# File 'lib/gitlab/client/award_emojis.rb', line 18 def award_emojis(project, awardable_id, awardable_type) get("/projects/#{url_encode project}/#{awardable_type}s/#{awardable_id}/award_emoji") end |
#create_award_emoji(project, awardable_id, awardable_type, emoji_name) ⇒ Gitlab::ObjectifiedHash
Awards a new emoji to an awardable(issue, merge request or snippet)
83 84 85 |
# File 'lib/gitlab/client/award_emojis.rb', line 83 def create_award_emoji(project, awardable_id, awardable_type, emoji_name) post("/projects/#{url_encode project}/#{awardable_type}s/#{awardable_id}/award_emoji", body: { name: emoji_name }) end |
#create_note_award_emoji(project, awardable_id, awardable_type, note_id, emoji_name) ⇒ Gitlab::ObjectifiedHash
Awards a new emoji to a note on an awardable(issue, merge request or snippet)
100 101 102 |
# File 'lib/gitlab/client/award_emojis.rb', line 100 def create_note_award_emoji(project, awardable_id, awardable_type, note_id, emoji_name) post("/projects/#{url_encode project}/#{awardable_type}s/#{awardable_id}/notes/#{note_id}/award_emoji", body: { name: emoji_name }) end |
#delete_award_emoji(project, awardable_id, awardable_type, award_id) ⇒ void
This method returns an undefined value.
Deletes a single award emoji from an awardable(issue, merge request or snippet)
116 117 118 |
# File 'lib/gitlab/client/award_emojis.rb', line 116 def delete_award_emoji(project, awardable_id, awardable_type, award_id) delete("/projects/#{url_encode project}/#{awardable_type}s/#{awardable_id}/award_emoji/#{award_id}") end |
#delete_note_award_emoji(project, awardable_id, awardable_type, note_id, award_id) ⇒ void
This method returns an undefined value.
Deletes a single award emoji from a single note on an awardable(issue, merge request or snippet)
133 134 135 |
# File 'lib/gitlab/client/award_emojis.rb', line 133 def delete_note_award_emoji(project, awardable_id, awardable_type, note_id, award_id) delete("/projects/#{url_encode project}/#{awardable_type}s/#{awardable_id}/notes/#{note_id}/award_emoji/#{award_id}") end |
#note_award_emoji(project, awardable_id, awardable_type, note_id, award_id) ⇒ Gitlab::ObjectifiedHash
Gets a single award emoji from a single note on an awardable(issue, merge request or snippet)
67 68 69 |
# File 'lib/gitlab/client/award_emojis.rb', line 67 def note_award_emoji(project, awardable_id, awardable_type, note_id, award_id) get("/projects/#{url_encode project}/#{awardable_type}s/#{awardable_id}/notes/#{note_id}/award_emoji/#{award_id}") end |
#note_award_emojis(project, awardable_id, awardable_type, note_id) ⇒ Array<Gitlab::ObjectifiedHash>
Gets a list of all award emoji for a single note on an awardable(issue, merge request or snippet)
34 35 36 |
# File 'lib/gitlab/client/award_emojis.rb', line 34 def note_award_emojis(project, awardable_id, awardable_type, note_id) get("/projects/#{url_encode project}/#{awardable_type}s/#{awardable_id}/notes/#{note_id}/award_emoji") end |