From 7674bf2e4ca7be7b1bc9351801e62a3c648b940d Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 14 Mar 2019 20:37:22 +0800 Subject: [PATCH] implement DescribeContinuousQueries --- InfluxDB.Net/Client/InfluxDbClientBase.cs | 10 ++++++++-- InfluxDB.Net/Models/ContinuousQuery.cs | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/InfluxDB.Net/Client/InfluxDbClientBase.cs b/InfluxDB.Net/Client/InfluxDbClientBase.cs index 2cbd3ea..af6f184 100644 --- a/InfluxDB.Net/Client/InfluxDbClientBase.cs +++ b/InfluxDB.Net/Client/InfluxDbClientBase.cs @@ -131,9 +131,15 @@ public async Task Query(IEnumerable GetContinuousQueries(IEnumerable errorHandlers, string database) + public async Task GetContinuousQueries(IEnumerable errorHandlers, string database) { - throw new NotImplementedException(); + return await RequestAsync(errorHandlers, HttpMethod.Get, "query", null, + new Dictionary + { + {QueryParams.Db, database}, + {QueryParams.Query, "SHOW CONTINUOUS QUERIES"} + }, + requestTimeout: _configuration.RequestTimeout); } public Task DeleteContinuousQuery(IEnumerable errorHandlers, string database, int id) diff --git a/InfluxDB.Net/Models/ContinuousQuery.cs b/InfluxDB.Net/Models/ContinuousQuery.cs index d03bf86..9b4861f 100644 --- a/InfluxDB.Net/Models/ContinuousQuery.cs +++ b/InfluxDB.Net/Models/ContinuousQuery.cs @@ -2,7 +2,7 @@ namespace InfluxDB.Net.Models { public class ContinuousQuery { - public int Id { get; set; } + public string Name { get; set; } public string Query { get; set; } } } \ No newline at end of file