code optimization
This commit is contained in:
@@ -1,45 +1,39 @@
|
||||
using Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.FileRetention.Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.FileRetention
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.FileRetention;
|
||||
|
||||
public class FilesRetentionClient : ClientBase
|
||||
{
|
||||
public class FilesRetentionClient : ClientBase
|
||||
public FilesRetentionClient(NextcloudClient client) : base(client)
|
||||
{
|
||||
public FilesRetentionClient(NextcloudClient client) : base(client)
|
||||
}
|
||||
|
||||
public bool CreateRetentionRule(RetentionRuleInfo rule)
|
||||
{
|
||||
var entry = rule.ToOcsData();
|
||||
return Client.Ocs.GetApi<OcsApiFilesRetention>().CreateRetentionRule(entry);
|
||||
}
|
||||
|
||||
public bool DeleteRetentionRule(int ruleID)
|
||||
{
|
||||
return Client.Ocs.GetApi<OcsApiFilesRetention>().DeleteRetentionRule(ruleID);
|
||||
}
|
||||
|
||||
public RetentionRule[]? GetRetentionRules()
|
||||
{
|
||||
var api = Client.Ocs.GetApi<OcsApiFilesRetention>();
|
||||
var response = api.GetRetentionRules();
|
||||
|
||||
if (response?.Data is not null)
|
||||
{
|
||||
var rules = new List<RetentionRule>();
|
||||
|
||||
foreach (var entry in response.Data)
|
||||
rules.Add(new RetentionRule(entry));
|
||||
|
||||
return rules.ToArray();
|
||||
}
|
||||
|
||||
public bool CreateRetentionRule(RetentionRuleInfo rule)
|
||||
{
|
||||
var entry = rule.ToOcsData();
|
||||
return Client.Ocs.GetApi<OcsApiFilesRetention>().CreateRetentionRule(entry);
|
||||
}
|
||||
|
||||
public bool DeleteRetentionRule(int ruleID)
|
||||
{
|
||||
return Client.Ocs.GetApi<OcsApiFilesRetention>().DeleteRetentionRule(ruleID);
|
||||
}
|
||||
|
||||
public RetentionRule[]? GetRetentionRules()
|
||||
{
|
||||
var api = Client.Ocs.GetApi<OcsApiFilesRetention>();
|
||||
var response = api.GetRetentionRules();
|
||||
|
||||
if (response?.Data is not null)
|
||||
{
|
||||
var rules = new List<RetentionRule>();
|
||||
|
||||
foreach (var entry in response.Data)
|
||||
rules.Add(new RetentionRule(entry));
|
||||
|
||||
return rules.ToArray();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,36 +1,30 @@
|
||||
using Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.FileRetention.Ocs;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.FileRetention.Model
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.FileRetention.Model;
|
||||
|
||||
public class RetentionRule : RetentionRuleInfo
|
||||
{
|
||||
public class RetentionRule : RetentionRuleInfo
|
||||
/// <summary>
|
||||
/// The ID for the retention rule.
|
||||
/// </summary>
|
||||
public int ID { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Defines if a background job has been generated
|
||||
/// </summary>
|
||||
public bool HasJob { get; init; }
|
||||
|
||||
public RetentionRule()
|
||||
{
|
||||
/// <summary>
|
||||
/// The ID for the retention rule.
|
||||
/// </summary>
|
||||
public int ID { get; init; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Defines if a background job has been generated
|
||||
/// </summary>
|
||||
public bool HasJob { get; init; }
|
||||
|
||||
public RetentionRule()
|
||||
{
|
||||
}
|
||||
|
||||
public RetentionRule(OcsResponseDataEntryRetention data)
|
||||
{
|
||||
ID = data.ID ?? -1;
|
||||
TagID = data.TagID ?? -1;
|
||||
TimeUnit = (RetentionTimeUnit)(data.TimeUnit ?? 0);
|
||||
TimeAmount = data.TimeAmount ?? -1;
|
||||
TimeAfter = (RetentionTimeAfter)(data.TimeAfter ?? 0);
|
||||
HasJob = data.HasJob ?? false;
|
||||
}
|
||||
public RetentionRule(OcsResponseDataEntryRetention data)
|
||||
{
|
||||
ID = data.ID ?? -1;
|
||||
TagID = data.TagID ?? -1;
|
||||
TimeUnit = (RetentionTimeUnit)(data.TimeUnit ?? 0);
|
||||
TimeAmount = data.TimeAmount ?? -1;
|
||||
TimeAfter = (RetentionTimeAfter)(data.TimeAfter ?? 0);
|
||||
HasJob = data.HasJob ?? false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,43 +1,37 @@
|
||||
using Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.FileRetention.Ocs;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.FileRetention.Model
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.FileRetention.Model;
|
||||
|
||||
public class RetentionRuleInfo
|
||||
{
|
||||
public class RetentionRuleInfo
|
||||
/// <summary>
|
||||
/// The ID for the tag that is used for this rule.
|
||||
/// </summary>
|
||||
public int TagID { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// The unit used for the time.
|
||||
/// </summary>
|
||||
public RetentionTimeUnit TimeUnit { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Represents numer of days/weeks/months/years.
|
||||
/// </summary>
|
||||
public int TimeAmount { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// The time used for the rule.
|
||||
/// </summary>
|
||||
public RetentionTimeAfter TimeAfter { get; init; }
|
||||
|
||||
public OcsDataRetentionRule ToOcsData()
|
||||
{
|
||||
/// <summary>
|
||||
/// The ID for the tag that is used for this rule.
|
||||
/// </summary>
|
||||
public int TagID { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// The unit used for the time.
|
||||
/// </summary>
|
||||
public RetentionTimeUnit TimeUnit { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Represents numer of days/weeks/months/years.
|
||||
/// </summary>
|
||||
public int TimeAmount { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// The time used for the rule.
|
||||
/// </summary>
|
||||
public RetentionTimeAfter TimeAfter { get; init; }
|
||||
|
||||
public OcsDataRetentionRule ToOcsData()
|
||||
return new OcsDataRetentionRule
|
||||
{
|
||||
return new OcsDataRetentionRule
|
||||
{
|
||||
TagID = TagID,
|
||||
TimeUnit = (int)TimeUnit,
|
||||
TimeAmount = TimeAmount,
|
||||
TimeAfter = (int)TimeAfter
|
||||
};
|
||||
}
|
||||
TagID = TagID,
|
||||
TimeUnit = (int)TimeUnit,
|
||||
TimeAmount = TimeAmount,
|
||||
TimeAfter = (int)TimeAfter
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.FileRetention.Model;
|
||||
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.FileRetention.Model
|
||||
public enum RetentionTimeAfter
|
||||
{
|
||||
public enum RetentionTimeAfter
|
||||
{
|
||||
CreationDate,
|
||||
LastAccess
|
||||
}
|
||||
CreationDate,
|
||||
LastAccess
|
||||
}
|
||||
|
||||
@@ -1,16 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.FileRetention.Model;
|
||||
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.FileRetention.Model
|
||||
public enum RetentionTimeUnit
|
||||
{
|
||||
public enum RetentionTimeUnit
|
||||
{
|
||||
Day,
|
||||
Week,
|
||||
Month,
|
||||
Year
|
||||
}
|
||||
Day,
|
||||
Week,
|
||||
Month,
|
||||
Year
|
||||
}
|
||||
|
||||
@@ -1,26 +1,20 @@
|
||||
using Newtonsoft.Json;
|
||||
using Pilz.Networking.CloudProviders.Nextcloud.Ocs;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.FileRetention.Ocs
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.FileRetention.Ocs;
|
||||
|
||||
public class OcsDataRetentionRule : OcsData
|
||||
{
|
||||
public class OcsDataRetentionRule : OcsData
|
||||
{
|
||||
|
||||
[JsonProperty("tagid")]
|
||||
public int? TagID { get; set; }
|
||||
[JsonProperty("tagid")]
|
||||
public int? TagID { get; set; }
|
||||
|
||||
[JsonProperty("timeunit")]
|
||||
public int? TimeUnit { get; set; }
|
||||
[JsonProperty("timeunit")]
|
||||
public int? TimeUnit { get; set; }
|
||||
|
||||
[JsonProperty("timeamount")]
|
||||
public int? TimeAmount { get; set; }
|
||||
[JsonProperty("timeamount")]
|
||||
public int? TimeAmount { get; set; }
|
||||
|
||||
[JsonProperty("timeafter")]
|
||||
public int? TimeAfter { get; set; }
|
||||
}
|
||||
[JsonProperty("timeafter")]
|
||||
public int? TimeAfter { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,31 +1,25 @@
|
||||
using Newtonsoft.Json;
|
||||
using Pilz.Networking.CloudProviders.Nextcloud.Ocs.Responses;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.FileRetention.Ocs
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.FileRetention.Ocs;
|
||||
|
||||
public class OcsResponseDataEntryRetention : OcsResponseDataEntry
|
||||
{
|
||||
public class OcsResponseDataEntryRetention : OcsResponseDataEntry
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public int? ID { get; set; }
|
||||
[JsonProperty("id")]
|
||||
public int? ID { get; set; }
|
||||
|
||||
[JsonProperty("tagid")]
|
||||
public int? TagID { get; set; }
|
||||
[JsonProperty("tagid")]
|
||||
public int? TagID { get; set; }
|
||||
|
||||
[JsonProperty("timeunit")]
|
||||
public int? TimeUnit { get; set; }
|
||||
[JsonProperty("timeunit")]
|
||||
public int? TimeUnit { get; set; }
|
||||
|
||||
[JsonProperty("timeamount")]
|
||||
public int? TimeAmount { get; set; }
|
||||
[JsonProperty("timeamount")]
|
||||
public int? TimeAmount { get; set; }
|
||||
|
||||
[JsonProperty("timeafter")]
|
||||
public int? TimeAfter { get; set; }
|
||||
[JsonProperty("timeafter")]
|
||||
public int? TimeAfter { get; set; }
|
||||
|
||||
[JsonProperty("hasJob")]
|
||||
public bool? HasJob { get; set; }
|
||||
}
|
||||
[JsonProperty("hasJob")]
|
||||
public bool? HasJob { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,14 +1,7 @@
|
||||
using Newtonsoft.Json;
|
||||
using Pilz.Networking.CloudProviders.Nextcloud.Ocs.Responses;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Pilz.Networking.CloudProviders.Nextcloud.Ocs.Responses;
|
||||
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.FileRetention.Ocs
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.FileRetention.Ocs;
|
||||
|
||||
public class OcsResponseRetention : OcsResponse<OcsResponseDataArray<OcsResponseDataEntryRetention>>
|
||||
{
|
||||
public class OcsResponseRetention : OcsResponse<OcsResponseDataArray<OcsResponseDataEntryRetention>>
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,38 +1,31 @@
|
||||
using Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.FileRetention.Ocs;
|
||||
using Pilz.Networking.CloudProviders.Nextcloud.Ocs;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.FileRetention
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.FileRetention;
|
||||
|
||||
public class OcsApiFilesRetention : OcsApiBase
|
||||
{
|
||||
public class OcsApiFilesRetention : OcsApiBase
|
||||
public static readonly OcsApiUrlPath OCS_FILE_RETENTION_RULES = new("/ocs/v2.php/apps/files_retention/api/v1/retentions");
|
||||
public static readonly OcsApiUrlPath OCS_FILE_RETENTION_RULE = new("/ocs/v2.php/apps/files_retention/api/v1/retentions/{0}");
|
||||
|
||||
public OcsApiFilesRetention(OcsApi manager) : base(manager)
|
||||
{
|
||||
public static readonly OcsApiUrlPath OCS_FILE_RETENTION_RULES = new("/ocs/v2.php/apps/files_retention/api/v1/retentions");
|
||||
public static readonly OcsApiUrlPath OCS_FILE_RETENTION_RULE = new("/ocs/v2.php/apps/files_retention/api/v1/retentions/{0}");
|
||||
}
|
||||
|
||||
public OcsApiFilesRetention(OcsApi manager) : base(manager)
|
||||
{
|
||||
}
|
||||
public bool CreateRetentionRule(OcsDataRetentionRule rule)
|
||||
{
|
||||
var response = Manager.MakeRequest(HttpMethod.Post, OCS_FILE_RETENTION_RULES, content: rule);
|
||||
return response.IsSuccessStatusCode;
|
||||
}
|
||||
|
||||
public bool CreateRetentionRule(OcsDataRetentionRule rule)
|
||||
{
|
||||
var response = Manager.MakeRequest(HttpMethod.Post, OCS_FILE_RETENTION_RULES, content: rule);
|
||||
return response.IsSuccessStatusCode;
|
||||
}
|
||||
public bool DeleteRetentionRule(int ruleID)
|
||||
{
|
||||
var response = Manager.MakeRequest(HttpMethod.Delete, OCS_FILE_RETENTION_RULE.FillParameters(ruleID));
|
||||
return response.IsSuccessStatusCode;
|
||||
}
|
||||
|
||||
public bool DeleteRetentionRule(int ruleID)
|
||||
{
|
||||
var response = Manager.MakeRequest(HttpMethod.Delete, OCS_FILE_RETENTION_RULE.FillParameters(ruleID));
|
||||
return response.IsSuccessStatusCode;
|
||||
}
|
||||
|
||||
public OcsResponseRetention? GetRetentionRules()
|
||||
{
|
||||
return Manager.MakeRequestOcs<OcsResponseRetention>(HttpMethod.Get, OCS_FILE_RETENTION_RULES);
|
||||
}
|
||||
public OcsResponseRetention? GetRetentionRules()
|
||||
{
|
||||
return Manager.MakeRequestOcs<OcsResponseRetention>(HttpMethod.Get, OCS_FILE_RETENTION_RULES);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,116 +1,110 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.Tables.Model
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.Tables.Model;
|
||||
|
||||
public class Column
|
||||
{
|
||||
public class Column
|
||||
[JsonProperty("type")]
|
||||
private string? type;
|
||||
|
||||
[JsonProperty("subtype")]
|
||||
private string? subtype;
|
||||
|
||||
[JsonProperty("id")]
|
||||
public long ColumnId { get; set; }
|
||||
|
||||
[JsonProperty("tableId")]
|
||||
public long TableId { get; set; }
|
||||
|
||||
[JsonProperty("title")]
|
||||
public string? Title { get; set; }
|
||||
|
||||
[JsonProperty("createdBy")]
|
||||
public string? CreatedBy { get; set; }
|
||||
|
||||
[JsonProperty("createdAt")]
|
||||
public DateTime CreatedAt { get; set; }
|
||||
|
||||
[JsonProperty("lastEditBy")]
|
||||
public string? LastEditBy { get; set; }
|
||||
|
||||
[JsonProperty("lastEditAt")]
|
||||
public DateTime LastEditAt { get; set; }
|
||||
|
||||
[JsonProperty("mandatory")]
|
||||
public bool Mandatory { get; set; }
|
||||
|
||||
[JsonProperty("description")]
|
||||
public string? Description { get; set; }
|
||||
|
||||
[JsonProperty("numberDefault")]
|
||||
public float? NumberDefault { get; set; }
|
||||
|
||||
[JsonProperty("numberMin")]
|
||||
public float? NumberMin { get; set; }
|
||||
|
||||
[JsonProperty("numberMax")]
|
||||
public float? NumberMax { get; set; }
|
||||
|
||||
[JsonProperty("numberDecimals")]
|
||||
public float NumberDecimals { get; set; }
|
||||
|
||||
[JsonProperty("numberPrefix")]
|
||||
public string? NumberPrefix { get; set; }
|
||||
|
||||
[JsonProperty("numberSuffix")]
|
||||
public string? NumberSuffix { get; set; }
|
||||
|
||||
[JsonProperty("textDefault")]
|
||||
public string? TextDefault { get; set; }
|
||||
|
||||
[JsonProperty("textAllowedPattern")]
|
||||
public string? TextAllowedPattern { get; set; }
|
||||
|
||||
[JsonProperty("textMaxLength")]
|
||||
public int? TextMaxLength { get; set; }
|
||||
|
||||
[JsonProperty("selectionOptions")]
|
||||
public List<ColumnSelectionOption> SelectionOptions { get; } = new();
|
||||
|
||||
[JsonProperty("selectionDefault")]
|
||||
public int? SelectionDefault { get; set; }
|
||||
|
||||
[JsonProperty("datetimeDefault")]
|
||||
public DateTime? DatetimeDefault { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public ColumnType Type
|
||||
{
|
||||
[JsonProperty("type")]
|
||||
private string? type;
|
||||
|
||||
[JsonProperty("subtype")]
|
||||
private string? subtype;
|
||||
|
||||
[JsonProperty("id")]
|
||||
public long ColumnId { get; set; }
|
||||
|
||||
[JsonProperty("tableId")]
|
||||
public long TableId { get; set; }
|
||||
|
||||
[JsonProperty("title")]
|
||||
public string? Title { get; set; }
|
||||
|
||||
[JsonProperty("createdBy")]
|
||||
public string? CreatedBy { get; set; }
|
||||
|
||||
[JsonProperty("createdAt")]
|
||||
public DateTime CreatedAt { get; set; }
|
||||
|
||||
[JsonProperty("lastEditBy")]
|
||||
public string? LastEditBy { get; set; }
|
||||
|
||||
[JsonProperty("lastEditAt")]
|
||||
public DateTime LastEditAt { get; set; }
|
||||
|
||||
[JsonProperty("mandatory")]
|
||||
public bool Mandatory { get; set; }
|
||||
|
||||
[JsonProperty("description")]
|
||||
public string? Description { get; set; }
|
||||
|
||||
[JsonProperty("numberDefault")]
|
||||
public float? NumberDefault { get; set; }
|
||||
|
||||
[JsonProperty("numberMin")]
|
||||
public float? NumberMin { get; set; }
|
||||
|
||||
[JsonProperty("numberMax")]
|
||||
public float? NumberMax { get; set; }
|
||||
|
||||
[JsonProperty("numberDecimals")]
|
||||
public float NumberDecimals { get; set; }
|
||||
|
||||
[JsonProperty("numberPrefix")]
|
||||
public string? NumberPrefix { get; set; }
|
||||
|
||||
[JsonProperty("numberSuffix")]
|
||||
public string? NumberSuffix { get; set; }
|
||||
|
||||
[JsonProperty("textDefault")]
|
||||
public string? TextDefault { get; set; }
|
||||
|
||||
[JsonProperty("textAllowedPattern")]
|
||||
public string? TextAllowedPattern { get; set; }
|
||||
|
||||
[JsonProperty("textMaxLength")]
|
||||
public int? TextMaxLength { get; set; }
|
||||
|
||||
[JsonProperty("selectionOptions")]
|
||||
public List<ColumnSelectionOption> SelectionOptions { get; } = new();
|
||||
|
||||
[JsonProperty("selectionDefault")]
|
||||
public int? SelectionDefault { get; set; }
|
||||
|
||||
[JsonProperty("datetimeDefault")]
|
||||
public DateTime? DatetimeDefault { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public ColumnType Type
|
||||
get => type switch
|
||||
{
|
||||
get => type switch
|
||||
{
|
||||
"text" => ColumnType.Text,
|
||||
"selection" => ColumnType.Selection,
|
||||
"datetime" => ColumnType.DateTime,
|
||||
_ => ColumnType.Unknown,
|
||||
};
|
||||
set => type = value switch
|
||||
{
|
||||
ColumnType.Text => "text",
|
||||
ColumnType.Selection => "selection",
|
||||
ColumnType.DateTime => "datetime",
|
||||
_ => "text"
|
||||
};
|
||||
}
|
||||
|
||||
[JsonIgnore]
|
||||
public ColumnSubtype Subtype
|
||||
"text" => ColumnType.Text,
|
||||
"selection" => ColumnType.Selection,
|
||||
"datetime" => ColumnType.DateTime,
|
||||
_ => ColumnType.Unknown,
|
||||
};
|
||||
set => type = value switch
|
||||
{
|
||||
get => subtype switch
|
||||
{
|
||||
"line" => ColumnSubtype.Line,
|
||||
"" => ColumnSubtype.None,
|
||||
_ => ColumnSubtype.Unknown,
|
||||
};
|
||||
set => subtype = value switch
|
||||
{
|
||||
ColumnSubtype.Line => "line",
|
||||
_ => ""
|
||||
};
|
||||
}
|
||||
ColumnType.Text => "text",
|
||||
ColumnType.Selection => "selection",
|
||||
ColumnType.DateTime => "datetime",
|
||||
_ => "text"
|
||||
};
|
||||
}
|
||||
|
||||
[JsonIgnore]
|
||||
public ColumnSubtype Subtype
|
||||
{
|
||||
get => subtype switch
|
||||
{
|
||||
"line" => ColumnSubtype.Line,
|
||||
"" => ColumnSubtype.None,
|
||||
_ => ColumnSubtype.Unknown,
|
||||
};
|
||||
set => subtype = value switch
|
||||
{
|
||||
ColumnSubtype.Line => "line",
|
||||
_ => ""
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,18 +1,12 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.Tables.Model
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.Tables.Model;
|
||||
|
||||
public class ColumnSelectionOption
|
||||
{
|
||||
public class ColumnSelectionOption
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public long Id { get; set; }
|
||||
[JsonProperty("id")]
|
||||
public long Id { get; set; }
|
||||
|
||||
[JsonProperty("label")]
|
||||
public string? Label { get; set; }
|
||||
}
|
||||
[JsonProperty("label")]
|
||||
public string? Label { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,15 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.Tables.Model;
|
||||
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.Tables.Model
|
||||
public enum ColumnSubtype
|
||||
{
|
||||
public enum ColumnSubtype
|
||||
{
|
||||
None,
|
||||
Unknown,
|
||||
Line
|
||||
}
|
||||
None,
|
||||
Unknown,
|
||||
Line
|
||||
}
|
||||
|
||||
@@ -1,16 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.Tables.Model;
|
||||
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.Tables.Model
|
||||
public enum ColumnType
|
||||
{
|
||||
public enum ColumnType
|
||||
{
|
||||
Unknown,
|
||||
Text,
|
||||
Selection,
|
||||
DateTime
|
||||
}
|
||||
Unknown,
|
||||
Text,
|
||||
Selection,
|
||||
DateTime
|
||||
}
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.Tables.Model;
|
||||
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.Tables.Model
|
||||
public class Columns : List<Column>
|
||||
{
|
||||
public class Columns : List<Column>
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,33 +1,27 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.Tables.Model
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.Tables.Model;
|
||||
|
||||
public class Row
|
||||
{
|
||||
public class Row
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public long RowId { get; set; } = -1;
|
||||
[JsonProperty("id")]
|
||||
public long RowId { get; set; } = -1;
|
||||
|
||||
[JsonProperty("tableId")]
|
||||
public long TableId { get; set; } = -1;
|
||||
[JsonProperty("tableId")]
|
||||
public long TableId { get; set; } = -1;
|
||||
|
||||
[JsonProperty("createdBy")]
|
||||
public string? CreatedBy { get; set; }
|
||||
[JsonProperty("createdBy")]
|
||||
public string? CreatedBy { get; set; }
|
||||
|
||||
[JsonProperty("createdAt")]
|
||||
public DateTime CreatedAt { get; set; }
|
||||
[JsonProperty("createdAt")]
|
||||
public DateTime CreatedAt { get; set; }
|
||||
|
||||
[JsonProperty("lastEditBy")]
|
||||
public string? LastEditBy { get; set; }
|
||||
[JsonProperty("lastEditBy")]
|
||||
public string? LastEditBy { get; set; }
|
||||
|
||||
[JsonProperty("lastEditAt")]
|
||||
public DateTime LastEditAt { get; set; }
|
||||
[JsonProperty("lastEditAt")]
|
||||
public DateTime LastEditAt { get; set; }
|
||||
|
||||
[JsonProperty("data")]
|
||||
public List<RowData> Data { get; set; } = new();
|
||||
}
|
||||
[JsonProperty("data")]
|
||||
public List<RowData> Data { get; set; } = new();
|
||||
}
|
||||
|
||||
@@ -1,18 +1,12 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.Tables.Model
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.Tables.Model;
|
||||
|
||||
public class RowData
|
||||
{
|
||||
public class RowData
|
||||
{
|
||||
[JsonProperty("columnId")]
|
||||
public long ColumnId { get; set; }
|
||||
[JsonProperty("columnId")]
|
||||
public long ColumnId { get; set; }
|
||||
|
||||
[JsonProperty("value")]
|
||||
public object? Value { get; set; }
|
||||
}
|
||||
[JsonProperty("value")]
|
||||
public object? Value { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.Tables.Model;
|
||||
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.Tables.Model
|
||||
public class RowSimple : List<object>
|
||||
{
|
||||
public class RowSimple : List<object>
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,9 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.Tables.Model
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.Tables.Model;
|
||||
|
||||
public class RowUpdate
|
||||
{
|
||||
public class RowUpdate
|
||||
{
|
||||
[JsonProperty("data")]
|
||||
public Dictionary<long, object?> Data { get; set; } = new();
|
||||
}
|
||||
[JsonProperty("data")]
|
||||
public Dictionary<long, object?> Data { get; set; } = new();
|
||||
}
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.Tables.Model;
|
||||
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.Tables.Model
|
||||
public class Rows : List<Row>
|
||||
{
|
||||
public class Rows : List<Row>
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.Tables.Model;
|
||||
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.Tables.Model
|
||||
public class RowsSimple : List<RowSimple>
|
||||
{
|
||||
public class RowsSimple : List<RowSimple>
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,86 +1,79 @@
|
||||
using Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.Tables.Model;
|
||||
using Pilz.Networking.CloudProviders.Nextcloud.Ocs;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.Tables
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.Tables;
|
||||
|
||||
public class OcsApiTables : OcsApiBase
|
||||
{
|
||||
public class OcsApiTables : OcsApiBase
|
||||
public static readonly OcsApiUrlPath OCS_TABLES_TABLE_ROWS = new("/apps/tables/api/1/tables/{0}/rows");
|
||||
public static readonly OcsApiUrlPath OCS_TABLES_VIEW_ROWS = new("/apps/tables/api/1/views/{0}/rows");
|
||||
public static readonly OcsApiUrlPath OCS_TABLES_TABLE_ROWS_SIMPLE = new("/apps/tables/api/1/tables/{0}/rows/simple");
|
||||
public static readonly OcsApiUrlPath OCS_TABLES_TABLE_COLUMNS = new("/apps/tables/api/1/tables/{0}/columns");
|
||||
public static readonly OcsApiUrlPath OCS_TABLES_VIEW_COLUMNS = new("/apps/tables/api/1/views/{0}/columns");
|
||||
public static readonly OcsApiUrlPath OCS_TABLES_ROW = new("/apps/tables/api/1/rows/{0}");
|
||||
public static readonly OcsApiUrlPath OCS_TABLES_COLUMN = new("/apps/tables/api/1/column/{0}");
|
||||
|
||||
public OcsApiTables(OcsApi manager) : base(manager)
|
||||
{
|
||||
public static readonly OcsApiUrlPath OCS_TABLES_TABLE_ROWS = new("/apps/tables/api/1/tables/{0}/rows");
|
||||
public static readonly OcsApiUrlPath OCS_TABLES_VIEW_ROWS = new("/apps/tables/api/1/views/{0}/rows");
|
||||
public static readonly OcsApiUrlPath OCS_TABLES_TABLE_ROWS_SIMPLE = new("/apps/tables/api/1/tables/{0}/rows/simple");
|
||||
public static readonly OcsApiUrlPath OCS_TABLES_TABLE_COLUMNS = new("/apps/tables/api/1/tables/{0}/columns");
|
||||
public static readonly OcsApiUrlPath OCS_TABLES_VIEW_COLUMNS = new("/apps/tables/api/1/views/{0}/columns");
|
||||
public static readonly OcsApiUrlPath OCS_TABLES_ROW = new("/apps/tables/api/1/rows/{0}");
|
||||
public static readonly OcsApiUrlPath OCS_TABLES_COLUMN = new("/apps/tables/api/1/column/{0}");
|
||||
}
|
||||
|
||||
public OcsApiTables(OcsApi manager) : base(manager)
|
||||
{
|
||||
}
|
||||
public RowsSimple? GetRowsSimple(long tableId)
|
||||
{
|
||||
return Manager.MakeRequest<RowsSimple>(HttpMethod.Get, OCS_TABLES_TABLE_ROWS_SIMPLE.FillParameters(tableId));
|
||||
}
|
||||
|
||||
public RowsSimple? GetRowsSimple(long tableId)
|
||||
{
|
||||
return Manager.MakeRequest<RowsSimple>(HttpMethod.Get, OCS_TABLES_TABLE_ROWS_SIMPLE.FillParameters(tableId));
|
||||
}
|
||||
public Rows? GetRows(long tableId)
|
||||
{
|
||||
return Manager.MakeRequest<Rows>(HttpMethod.Get, OCS_TABLES_TABLE_ROWS.FillParameters(tableId));
|
||||
}
|
||||
|
||||
public Rows? GetRows(long tableId)
|
||||
{
|
||||
return Manager.MakeRequest<Rows>(HttpMethod.Get, OCS_TABLES_TABLE_ROWS.FillParameters(tableId));
|
||||
}
|
||||
public Rows? GetViewRows(long viewId)
|
||||
{
|
||||
return Manager.MakeRequest<Rows>(HttpMethod.Get, OCS_TABLES_VIEW_ROWS.FillParameters(viewId));
|
||||
}
|
||||
|
||||
public Rows? GetViewRows(long viewId)
|
||||
{
|
||||
return Manager.MakeRequest<Rows>(HttpMethod.Get, OCS_TABLES_VIEW_ROWS.FillParameters(viewId));
|
||||
}
|
||||
public Row? GetRow(long rowId)
|
||||
{
|
||||
return Manager.MakeRequest<Row>(HttpMethod.Get, OCS_TABLES_ROW.FillParameters(rowId));
|
||||
}
|
||||
|
||||
public Row? GetRow(long rowId)
|
||||
{
|
||||
return Manager.MakeRequest<Row>(HttpMethod.Get, OCS_TABLES_ROW.FillParameters(rowId));
|
||||
}
|
||||
public Columns? GetColumns(long tableId)
|
||||
{
|
||||
return Manager.MakeRequest<Columns>(HttpMethod.Get, OCS_TABLES_TABLE_COLUMNS.FillParameters(tableId));
|
||||
}
|
||||
|
||||
public Columns? GetColumns(long tableId)
|
||||
{
|
||||
return Manager.MakeRequest<Columns>(HttpMethod.Get, OCS_TABLES_TABLE_COLUMNS.FillParameters(tableId));
|
||||
}
|
||||
public Columns? GetViewColumns(long viewId)
|
||||
{
|
||||
return Manager.MakeRequest<Columns>(HttpMethod.Get, OCS_TABLES_VIEW_COLUMNS.FillParameters(viewId));
|
||||
}
|
||||
|
||||
public Columns? GetViewColumns(long viewId)
|
||||
{
|
||||
return Manager.MakeRequest<Columns>(HttpMethod.Get, OCS_TABLES_VIEW_COLUMNS.FillParameters(viewId));
|
||||
}
|
||||
public Column? GetColumn(long columnId)
|
||||
{
|
||||
return Manager.MakeRequest<Column>(HttpMethod.Get, OCS_TABLES_COLUMN.FillParameters(columnId));
|
||||
}
|
||||
|
||||
public Column? GetColumn(long 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 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));
|
||||
}
|
||||
|
||||
public Column? DeleteColumn(long columnId)
|
||||
{
|
||||
return Manager.MakeRequest<Column>(HttpMethod.Delete, OCS_TABLES_COLUMN.FillParameters(columnId));
|
||||
}
|
||||
public Row? UpdateRow(long rowId, RowUpdate values)
|
||||
{
|
||||
return Manager.MakeRequest<Row>(HttpMethod.Put, OCS_TABLES_ROW.FillParameters(rowId), content: values);
|
||||
}
|
||||
|
||||
public Row? UpdateRow(long rowId, RowUpdate values)
|
||||
{
|
||||
return Manager.MakeRequest<Row>(HttpMethod.Put, OCS_TABLES_ROW.FillParameters(rowId), content: values);
|
||||
}
|
||||
public Row? CreateRow(long tableId, RowUpdate values)
|
||||
{
|
||||
return Manager.MakeRequest<Row>(HttpMethod.Post, OCS_TABLES_TABLE_ROWS.FillParameters(tableId), content: values);
|
||||
}
|
||||
|
||||
public Row? CreateRow(long tableId, RowUpdate values)
|
||||
{
|
||||
return Manager.MakeRequest<Row>(HttpMethod.Post, OCS_TABLES_TABLE_ROWS.FillParameters(tableId), content: values);
|
||||
}
|
||||
|
||||
public Row? CreateViewRow(long viewId, RowUpdate values)
|
||||
{
|
||||
return Manager.MakeRequest<Row>(HttpMethod.Post, OCS_TABLES_VIEW_ROWS.FillParameters(viewId), content: values);
|
||||
}
|
||||
public Row? CreateViewRow(long viewId, RowUpdate values)
|
||||
{
|
||||
return Manager.MakeRequest<Row>(HttpMethod.Post, OCS_TABLES_VIEW_ROWS.FillParameters(viewId), content: values);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,81 +1,75 @@
|
||||
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.Apps.Tables
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.Tables;
|
||||
|
||||
public class TablesClient : ClientBase
|
||||
{
|
||||
public class TablesClient : ClientBase
|
||||
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 RowsSimple? GetRowsSimple(long tableId)
|
||||
{
|
||||
return Client.Ocs.GetApi<OcsApiTables>().GetRowsSimple(tableId);
|
||||
}
|
||||
|
||||
public Rows? GetRows(long tableId)
|
||||
{
|
||||
return Client.Ocs.GetApi<OcsApiTables>().GetRows(tableId);
|
||||
}
|
||||
public Rows? GetRows(long tableId)
|
||||
{
|
||||
return Client.Ocs.GetApi<OcsApiTables>().GetRows(tableId);
|
||||
}
|
||||
|
||||
public Rows? GetViewRows(long viewId)
|
||||
{
|
||||
return Client.Ocs.GetApi<OcsApiTables>().GetViewRows(viewId);
|
||||
}
|
||||
public Rows? GetViewRows(long viewId)
|
||||
{
|
||||
return Client.Ocs.GetApi<OcsApiTables>().GetViewRows(viewId);
|
||||
}
|
||||
|
||||
public Row? GetRow(long rowId)
|
||||
{
|
||||
return Client.Ocs.GetApi<OcsApiTables>().GetRow(rowId);
|
||||
}
|
||||
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 Columns? GetColumns(long tableId)
|
||||
{
|
||||
return Client.Ocs.GetApi<OcsApiTables>().GetColumns(tableId);
|
||||
}
|
||||
|
||||
public Columns? GetViewColumns(long viewId)
|
||||
{
|
||||
return Client.Ocs.GetApi<OcsApiTables>().GetViewColumns(viewId);
|
||||
}
|
||||
public Columns? GetViewColumns(long viewId)
|
||||
{
|
||||
return Client.Ocs.GetApi<OcsApiTables>().GetViewColumns(viewId);
|
||||
}
|
||||
|
||||
public Column? GetColumn(long columnId)
|
||||
{
|
||||
return Client.Ocs.GetApi<OcsApiTables>().GetColumn(columnId);
|
||||
}
|
||||
public Column? GetColumn(long columnId)
|
||||
{
|
||||
return Client.Ocs.GetApi<OcsApiTables>().GetColumn(columnId);
|
||||
}
|
||||
|
||||
public bool DeleteRow(long rowId)
|
||||
{
|
||||
return DeleteRowAdv(rowId) is not null;
|
||||
}
|
||||
public bool DeleteRow(long rowId)
|
||||
{
|
||||
return DeleteRowAdv(rowId) is not null;
|
||||
}
|
||||
|
||||
public Row? DeleteRowAdv(long rowId)
|
||||
{
|
||||
return Client.Ocs.GetApi<OcsApiTables>().DeleteRow(rowId);
|
||||
}
|
||||
public Row? DeleteRowAdv(long rowId)
|
||||
{
|
||||
return Client.Ocs.GetApi<OcsApiTables>().DeleteRow(rowId);
|
||||
}
|
||||
|
||||
public bool DeleteColumn(long columnId)
|
||||
{
|
||||
return DeleteColumnAdv(columnId) is not null;
|
||||
}
|
||||
public bool DeleteColumn(long columnId)
|
||||
{
|
||||
return DeleteColumnAdv(columnId) is not null;
|
||||
}
|
||||
|
||||
public Column? DeleteColumnAdv(long columnId)
|
||||
{
|
||||
return Client.Ocs.GetApi<OcsApiTables>().DeleteColumn(columnId);
|
||||
}
|
||||
public Column? DeleteColumnAdv(long columnId)
|
||||
{
|
||||
return Client.Ocs.GetApi<OcsApiTables>().DeleteColumn(columnId);
|
||||
}
|
||||
|
||||
public Row? UpdateRow(long rowId, RowUpdate values)
|
||||
{
|
||||
return Client.Ocs.GetApi<OcsApiTables>().UpdateRow(rowId, values);
|
||||
}
|
||||
public Row? UpdateRow(long rowId, RowUpdate values)
|
||||
{
|
||||
return Client.Ocs.GetApi<OcsApiTables>().UpdateRow(rowId, values);
|
||||
}
|
||||
|
||||
public Row? CreateRow(long tableId, RowUpdate values)
|
||||
{
|
||||
return Client.Ocs.GetApi<OcsApiTables>().CreateRow(tableId, values);
|
||||
}
|
||||
public Row? CreateRow(long tableId, RowUpdate values)
|
||||
{
|
||||
return Client.Ocs.GetApi<OcsApiTables>().CreateRow(tableId, values);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user