From 42a6326591f92e674b153869c9c47389777d08a2 Mon Sep 17 00:00:00 2001 From: Kevin Whitaker <eyecreate@eyecreate.org> Date: Sat, 16 Sep 2023 03:20:41 +0000 Subject: [PATCH] add some more structure --- uNextcloud.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/uNextcloud.py b/uNextcloud.py index 983b273..7feff82 100644 --- a/uNextcloud.py +++ b/uNextcloud.py @@ -1,6 +1,5 @@ import ElementTree from urllib import urequest -import sdcard import gc import uos @@ -10,6 +9,18 @@ class uNextcloud: def __init__(self): self.sd_spi = machine.SPI(0, sck=machine.Pin(18, machine.Pin.OUT), mosi=machine.Pin(19, machine.Pin.OUT), miso=machine.Pin(16, machine.Pin.OUT)) self.sd = sdcard.SDCard(sd_spi, machine.Pin(22)) + self.username = None + self.password = None uos.mount(sd, "/sd") gc.collect() + def set_auth(self, username, password): + self.username = username + self.password = password + + def get_folder_items(self, folder_path): + pass + + def download_file_to_path(self, folder_path, file, destination_path): + pass + -- GitLab