49 lines
1.3 KiB
C#
49 lines
1.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using TBF.Rig.Output.DataStorage.UniDataStorageWriter.Interfaces;
|
|
|
|
namespace TBF.Rig.Output.DataStorage.UniDataStorageWriter.Writers
|
|
{
|
|
public class RestApiWriter : IDataStorageWriter
|
|
{
|
|
private readonly WriterCfg cfg;
|
|
|
|
public RestApiWriter(WriterCfg cfg)
|
|
{
|
|
this.cfg = cfg ?? throw new ArgumentNullException(nameof(cfg));
|
|
}
|
|
|
|
public object GetData(DataWriteRequest query)
|
|
{
|
|
if (string.IsNullOrWhiteSpace(cfg.DataSource))
|
|
throw new InvalidOperationException("REST API data source is empty.");
|
|
|
|
// TODO: HTTP request
|
|
return null;
|
|
}
|
|
|
|
public WriterDiagnosticResult TestQuery(bool enableDiagnostics)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public WriterDiagnosticResult TestSource(bool enableDiagnostics)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
WriterDiagnosticResult IDataStorageWriter.TestSource(bool validateOnly)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
WriterDiagnosticResult IDataStorageWriter.WriteData(DataWriteRequest query)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|