Module: Gitlab::Client::BroadcastMessages
- Included in:
- Gitlab::Client
- Defined in:
- lib/gitlab/client/broadcast_messages.rb
Overview
Defines methods related to broadcast messages (only accessible to administrators).
Instance Method Summary collapse
-
#broadcast_message(id) ⇒ Gitlab::ObjectifiedHash
Get a specific broadcast message.
-
#broadcast_messages ⇒ Array<Gitlab::ObjectifiedHash>
Get all broadcast messages.
-
#create_broadcast_message(message, options = {}) ⇒ Gitlab::ObjectifiedHash
Create a broadcast message.
-
#delete_broadcast_message(id) ⇒ nil
Delete a broadcast message.
-
#edit_broadcast_message(id, options = {}) ⇒ Gitlab::ObjectifiedHash
Update a broadcast message.
Instance Method Details
#broadcast_message(id) ⇒ Gitlab::ObjectifiedHash
Get a specific broadcast message
24 25 26 |
# File 'lib/gitlab/client/broadcast_messages.rb', line 24 def (id) get("/broadcast_messages/#{id}") end |
#broadcast_messages ⇒ Array<Gitlab::ObjectifiedHash>
Get all broadcast messages
13 14 15 |
# File 'lib/gitlab/client/broadcast_messages.rb', line 13 def get('/broadcast_messages') end |
#create_broadcast_message(message, options = {}) ⇒ Gitlab::ObjectifiedHash
Create a broadcast message.
41 42 43 44 |
# File 'lib/gitlab/client/broadcast_messages.rb', line 41 def (, = {}) body = { message: }.merge() post('/broadcast_messages', body: body) end |
#delete_broadcast_message(id) ⇒ nil
Delete a broadcast message.
71 72 73 |
# File 'lib/gitlab/client/broadcast_messages.rb', line 71 def (id) delete("/broadcast_messages/#{id}") end |
#edit_broadcast_message(id, options = {}) ⇒ Gitlab::ObjectifiedHash
Update a broadcast message
60 61 62 |
# File 'lib/gitlab/client/broadcast_messages.rb', line 60 def (id, = {}) put("/broadcast_messages/#{id}", body: ) end |