class GdsApi::PublishingApiV2

def get_expanded_links(content_id, with_drafts: true)

Other tags:
    See: https://github.com/alphagov/publishing-api/blob/master/doc/api.md#get-v2expanded-linkscontent_id -

Parameters:
  • with_drafts (Bool) -- Whether links to draft-only editions are returned, defaulting to `true`.
  • content_id (UUID) --
def get_expanded_links(content_id, with_drafts: true)
  params = with_drafts ? {} : { with_drafts: "false" }
  query = query_string(params)
  validate_content_id(content_id)
  get_json("#{endpoint}/v2/expanded-links/#{content_id}#{query}")
end