introduce a very simple Nextcloud API
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pilz.Networking.CloudProviders.Nextcloud.OCS.APIs
|
||||
{
|
||||
public class OcsApiCore : OcsApiBase
|
||||
{
|
||||
public static readonly OcsApiUrlPath OCS_CORE_APPPASSWORD = "/ocs/v2.php/core/apppassword";
|
||||
|
||||
public OcsApiCore(OcsApi manager) : base(manager)
|
||||
{
|
||||
}
|
||||
|
||||
public async Task<bool> DeleteAppPassword()
|
||||
{
|
||||
using var msg = await Manager.MakeRequest(HttpMethod.Delete, OCS_CORE_APPPASSWORD);
|
||||
return msg != null && msg.IsSuccessStatusCode;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user