38 lines
1017 B
C#
38 lines
1017 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace TBF.Rig.Input.DataStorage.UniDataStorageReader.Readers
|
|
{
|
|
public class RestApiReader : IDataStorageReader
|
|
{
|
|
private readonly ReaderCfg cfg;
|
|
|
|
public RestApiReader(ReaderCfg cfg)
|
|
{
|
|
this.cfg = cfg ?? throw new ArgumentNullException(nameof(cfg));
|
|
}
|
|
|
|
public object GetData(Interfaces.PublicModels.DataQuery query)
|
|
{
|
|
if (string.IsNullOrWhiteSpace(cfg.DataSource))
|
|
throw new InvalidOperationException("REST API data source is empty.");
|
|
|
|
// TODO: HTTP request
|
|
return null;
|
|
}
|
|
|
|
public ReaderDiagnosticResult TestQuery(bool enableDiagnostics)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public ReaderDiagnosticResult TestSource(bool enableDiagnostics)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|