lucidiot/HabitSharp
lucidiot
/
HabitSharp
Archived
1
0
Fork 0

Add status check endpoint

This commit is contained in:
Lucidiot 2018-11-10 17:59:48 +01:00
parent 857a793bf5
commit 4e28893225
No known key found for this signature in database
GPG Key ID: AE3F7205692FA205
1 changed files with 5 additions and 0 deletions

View File

@ -44,5 +44,10 @@ namespace HabitSharp
req.AddUrlSegment("model", ModelName);
return this.Execute<Result<Dictionary<string, string>>>(req);
}
public bool CheckStatus() {
var result = this.Execute<Result<Dictionary<string, string>>>(new RestRequest("status"));
return result.Success && result.Data.ContainsKey("status") && result.Data["status"] == "up";
}
}
}