class GdsApi::LinkCheckerApi
def check(uri, synchronous: nil, checked_within: nil)
-
(HTTPErrorResponse)
- if the request returns an error
Returns:
-
(LinkReport)
- A +SimpleDelegator+ of the +GdsApi::Response+ which
Parameters:
-
checked_within
(Fixnum
) -- The number of seconds the last check should -
synchronous
(Boolean
) -- Whether the check should happen immediately. (optional) -
uri
(String
) -- The URI to check.
def check(uri, synchronous: nil, checked_within: nil) params = { uri: uri, synchronous: synchronous, checked_within: checked_within } response = get_json( "#{endpoint}/check" + query_string(params.delete_if { |_, v| v.nil? }) ) LinkReport.new(response.to_hash) end