delete row & delete column & fix tables code in api base
This commit is contained in:
@@ -44,5 +44,15 @@ namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.Tables
|
|||||||
{
|
{
|
||||||
return Manager.MakeRequest<Column>(HttpMethod.Get, OCS_TABLES_COLUMN.FillParameters(columnId));
|
return Manager.MakeRequest<Column>(HttpMethod.Get, OCS_TABLES_COLUMN.FillParameters(columnId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Row? DeleteRow(long rowId)
|
||||||
|
{
|
||||||
|
return Manager.MakeRequest<Row>(HttpMethod.Delete, OCS_TABLES_ROW.FillParameters(rowId));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Column? DeleteColumn(long columnId)
|
||||||
|
{
|
||||||
|
return Manager.MakeRequest<Column>(HttpMethod.Delete, OCS_TABLES_COLUMN.FillParameters(columnId));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.Tables.Model;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@@ -11,5 +12,50 @@ namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.Tables
|
|||||||
public TablesClient(NextcloudClient client) : base(client)
|
public TablesClient(NextcloudClient client) : base(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);
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool DeleteRow(long rowId)
|
||||||
|
{
|
||||||
|
return DeleteRowAdv(rowId) is not null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Row? DeleteRowAdv(long rowId)
|
||||||
|
{
|
||||||
|
return Client.Ocs.GetApi<OcsApiTables>().DeleteRow(rowId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool DeleteColumn(long columnId)
|
||||||
|
{
|
||||||
|
return DeleteColumnAdv(columnId) is not null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Column? DeleteColumnAdv(long columnId)
|
||||||
|
{
|
||||||
|
return Client.Ocs.GetApi<OcsApiTables>().DeleteColumn(columnId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,30 +16,5 @@ namespace Pilz.Networking.CloudProviders.Nextcloud.Client
|
|||||||
{
|
{
|
||||||
Client = 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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user