add some more structure
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user