46 lines
1.2 KiB
C#
46 lines
1.2 KiB
C#
using Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.Tables;
|
|
using Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.Tables.Model;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Pilz.Networking.CloudProviders.Nextcloud.Client
|
|
{
|
|
public abstract class ClientBase
|
|
{
|
|
protected NextcloudClient Client { get; init; }
|
|
|
|
public ClientBase(NextcloudClient client)
|
|
{
|
|
Client = client;
|
|
}
|
|
|
|
public RowsSimple? GetRowsSimple(long tableId)
|
|
{
|
|
return Client.Ocs.GetApi<OcsApiTables>().GetRowsSimple(tableId);
|
|
}
|
|
|
|
public Rows? GetRows(long tableId)
|
|
{
|
|
return Client.Ocs.GetApi<OcsApiTables>().GetRows(tableId);
|
|
}
|
|
|
|
public Row? GetRow(long rowId)
|
|
{
|
|
return Client.Ocs.GetApi<OcsApiTables>().GetRow(rowId);
|
|
}
|
|
|
|
public Columns? GetColumns(long tableId)
|
|
{
|
|
return Client.Ocs.GetApi<OcsApiTables>().GetColumns(tableId);
|
|
}
|
|
|
|
public Column? GetColumn(long columnId)
|
|
{
|
|
return Client.Ocs.GetApi<OcsApiTables>().GetColumn(columnId);
|
|
}
|
|
}
|
|
}
|