class GdsApi::PublishingApiV2

def publish(content_id, update_type, options = {})

Other tags:
    See: https://github.com/alphagov/publishing-api/blob/master/doc/publishing-api-syntactic-usage.md#post-v2contentcontent_idpublish -

Options Hash: (**params)
  • locale (String) -- The language, defaults to 'en' in publishing-api.

Parameters:
  • params (Hash) --
  • update_type (String) -- Either 'major', 'minor' or 'republish'
  • content_id (UUID) --
def publish(content_id, update_type, options = {})
  params = {
    update_type: update_type
  }
  optional_keys = [
    :locale,
    :previous_version,
  ]
  params = merge_optional_keys(params, options, optional_keys)
  post_json!(publish_url(content_id), params)
end