class GdsApi::LinkCheckerApi

def create_batch(uris, checked_within: nil, webhook_uri: nil, webhook_secret_token: nil)

Raises:
  • (HTTPErrorResponse) - if the request returns an error

Returns:
  • (BatchReport) - A +SimpleDelegator+ of the +GdsApi::Response+ which

Parameters:
  • webhook_secret_token (String) -- A secret token that the API will use to generate a signature of the request. (optional)
  • webhook_uri (String) -- The URI to be called when the batch finishes. (optional)
  • checked_within (Fixnum) -- The number of seconds the last check should
  • uris (Array) -- A list of URIs to check.
def create_batch(uris, checked_within: nil, webhook_uri: nil, webhook_secret_token: nil)
  payload = {
    uris: uris,
    checked_within: checked_within,
    webhook_uri: webhook_uri,
    webhook_secret_token: webhook_secret_token,
  }
  response = post_json(
    "#{endpoint}/batch", payload.delete_if { |_, v| v.nil? }
  )
  BatchReport.new(response.to_hash)
end