-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #160 from abes-esr/ITEM-325-Mettre-en-place-les-in…
…dicateurs-de-dispo-des-applications Item 325 mettre en place les indicateurs de dispo des applications
- Loading branch information
Showing
3 changed files
with
53 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import axios from 'axios'; | ||
|
||
export class StatusService { | ||
constructor() { | ||
this.client = axios.create({ | ||
baseURL: "https://api.uptimerobot.com/" | ||
}); | ||
} | ||
|
||
async getStatusBaseXML(){ | ||
let data = {"api_key":"ur707639-b082a50474d1cfbe940438bc", "monitors":"782344734"} | ||
return this.client.post(`v2/getMonitors`,data).then( | ||
response => { | ||
return response.data.monitors[0].status === 2; | ||
}) | ||
} | ||
|
||
async getStatusCBS(){ | ||
let data = {"api_key":"ur707639-b082a50474d1cfbe940438bc", "monitors":"782344748"} | ||
return this.client.post(`v2/getMonitors`,data).then( | ||
response => { | ||
return response.data.monitors[0].status === 2; | ||
}) | ||
} | ||
} | ||
|
||
export default new StatusService() |