class GdsApi::PublishingApiV2

def patch_links(content_id, params)

Other tags:
    See: https://github.com/alphagov/publishing-api/blob/master/doc/api.md#patch-v2linkscontent_id -

Options Hash: (**params)
  • bulk_publishing (Boolean) -- Set to true to indicate that this is part of a mass-republish. Allows the publishing-api to prioritise human-initiated publishing (optional, default false)
  • previous_version (Integer) -- The previous version (returned by `get_links`). If this version is not the current version, the publishing-api will reject the change and return 409 Conflict. (optional)
  • links (Hash) -- A "links hash"

Parameters:
  • params (Hash) --
  • content_id (UUID) --
def patch_links(content_id, params)
  payload = {
    links: params.fetch(:links)
  }
  payload = merge_optional_keys(payload, params, [:previous_version, :bulk_publishing])
  patch_json(links_url(content_id), payload)
end