module Gitlab::Client::BroadcastMessages

def broadcast_message(id)

Returns:
  • (Gitlab::ObjectifiedHash) -

Parameters:
  • id (Integer) -- The ID of broadcast message
def broadcast_message(id)
  get("/broadcast_messages/#{id}")
end

def broadcast_messages

Returns:
  • (Array) -
def broadcast_messages
  get('/broadcast_messages')
end

def create_broadcast_message(message, options = {})

Returns:
  • (Gitlab::ObjectifiedHash) - Information about created broadcast message.

Options Hash: (**options)
  • :font(optional) (String) -- Foreground color hex code
  • :color(optional) (String) -- Background color hex code
  • :ends_at(optional) (DateTime) -- Ending time (defaults to one hour from current time)
  • :starts_at(optional) (DateTime) -- Starting time (defaults to current time)

Parameters:
  • options (Hash) -- A customizable set of options.
  • message (String) -- Message to display
def create_broadcast_message(message, options = {})
  body = { message: message }.merge(options)
  post('/broadcast_messages', body: body)
end

def delete_broadcast_message(id)

Returns:
  • (nil) - This API call returns an empty response body.

Parameters:
  • id (Integer) -- The ID of a broadcast message.
def delete_broadcast_message(id)
  delete("/broadcast_messages/#{id}")
end

def edit_broadcast_message(id, options = {})

Returns:
  • (Gitlab::ObjectifiedHash) - Information about updated broadcast message.

Options Hash: (**options)
  • :font(optional) (String) -- Foreground color hex code
  • :color(optional) (String) -- Background color hex code
  • :ends_at(optional) (DateTime) -- Ending time (defaults to one hour from current time)
  • :starts_at(optional) (DateTime) -- Starting time (defaults to current time)
  • :message(optional) (String) -- Message to display

Parameters:
  • options (Hash) -- A customizable set of options.
  • id (Integer) -- The ID of a broadcast message
def edit_broadcast_message(id, options = {})
  put("/broadcast_messages/#{id}", body: options)
end