feat(api_entreprise): add service api_up?, connected to their status page

This commit is contained in:
Colin Darie 2022-09-15 17:49:57 +02:00
parent 09a63c095e
commit d1c06aa92e
5 changed files with 339 additions and 0 deletions

View file

@ -72,6 +72,13 @@ class APIEntreprise::API
call(url)
end
def current_status
status_url = "https://entreprise.api.gouv.fr/watchdoge/dashboard/current_status"
response = Typhoeus.get(status_url, timeout: 1)
handle_response(response)
end
private
def call_with_siret(resource_name, siret_or_siren, user_id: nil)