class GdsApi::PublishingApi

def destroy_intent(base_path)

Other tags:
    See: https://github.com/alphagov/publishing-api/blob/master/doc/api.md#delete-publish-intentbase_path -

Parameters:
  • base_path (String) --
def destroy_intent(base_path)
  delete_json(intent_url(base_path))
rescue GdsApi::HTTPNotFound => e
  e
end

def intent_url(base_path)

def intent_url(base_path)
  "#{endpoint}/publish-intent#{base_path}"
end

def paths_url(base_path)

def paths_url(base_path)
  "#{endpoint}/paths#{base_path}"
end

def put_intent(base_path, payload)

Other tags:
    See: https://github.com/alphagov/publishing-api/blob/master/doc/api.md#put-publish-intentbase_path -

Parameters:
  • payload (Hash) --
  • base_path (String) --
def put_intent(base_path, payload)
  put_json(intent_url(base_path), payload)
end

def unreserve_path(base_path, publishing_app)

def unreserve_path(base_path, publishing_app)
  payload = { publishing_app: publishing_app }
  delete_json(unreserve_url(base_path), payload)
end

def unreserve_url(base_path)

def unreserve_url(base_path)
  "#{endpoint}/paths#{base_path}"
end